'. '

HiddenBuilder

From APIDesign

Jump to: navigation, search

HiddenBuilder is a trick that hides the builder from Javadoc of your API. It may be very handy when the builder comes with a complex (generic type) signature like in case of ResistingBuilder.

An example of HiddenBuilder can be found at Truffle API. There is PolyglotEngine.Builder which constructs instances of PolyglotEngine, but if you look at overall Truffle javadoc, the builder isn't visible in the package-summary overview.

The trick is to make the builder a non-static inner class (see the code) - then it isn't listed in the Javadoc classes overview.

Personal tools
buy