Class WadlGeneratorConfig.WadlGeneratorConfigDescriptionBuilder
- Enclosing class:
- WadlGeneratorConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()generator(Class<? extends WadlGenerator> generatorClass) Specify the property value for the currentWadlGenerator.
-
Constructor Details
-
WadlGeneratorConfigDescriptionBuilder
public WadlGeneratorConfigDescriptionBuilder()
-
-
Method Details
-
generator
public WadlGeneratorConfig.WadlGeneratorConfigDescriptionBuilder generator(Class<? extends WadlGenerator> generatorClass) -
prop
public WadlGeneratorConfig.WadlGeneratorConfigDescriptionBuilder prop(String propName, Object propValue) Specify the property value for the currentWadlGenerator.The
WadlGeneratorproperty type can be of any type with the following contraints:If the
WadlGeneratorproperty type is equal to the property value type then the property value is set as theWadlGeneratorproperty value.If the
WadlGeneratorproperty type has a constructor with a singleStringparameter type and the property value is aStringthen an instance of the property type is constructed with the property value and that instance is set as theWadlGeneratorproperty value.If the
WadlGeneratorproperty type is of typeFile, then the specified property value must be aStringstarting with the prefix classpath: to denote, that the File shall be loaded from the classpath like this:
Notice that the file is loaded as a resource from the classpath in this case, therefore classpath:test.xml refers to a file in the package of the specifiednew File( generator.getClass().getResource( strippedFilename ).toURI() )<classname>. The file reference classpath:/test.xml refers to a file that is in the root of the classpath.If the
WadlGeneratorproperty type is of typeInputStream, then the specified property value must be aStringand the instance ofInputStreamis obtained withClassLoader.getResourceAsStream(String)using the current threads context classloader. TheInputStreamwill be closed afterWadlGenerator.init()was called and therefore must not be closed by theWadlGeneratorusing this stream.- Parameters:
propName- the property namepropValue- the stringified property value- Returns:
- this builder instance
-
descriptions
-
build
-