class WadlGeneratorLoader
extends java.lang.Object
WadlGenerator
s from a provided list of WadlGeneratorDescription
s.WadlGeneratorDescription
s can refer to WadlGenerator
properties
of these types:
org.example.Foo
and the
property value provided by the WadlGeneratorDescription
is of type org.example.Foo
InputStream
can e.g. represent a file. The stream is loaded from the
property value (provided by the WadlGeneratorDescription
) via
ClassLoader.getResourceAsStream(String)
or via OSGi API means if OSGi runtime is detected.
The stream will be closed after WadlGenerator.init()
was called.
WadlGeneratorLoader
:new File( generator.getClass().getResource( strippedFilename ).toURI() )
Modifier and Type | Class and Description |
---|---|
private static interface |
WadlGeneratorLoader.Callback |
private static class |
WadlGeneratorLoader.CallbackList |
private static class |
WadlGeneratorLoader.WadlGeneratorControl |
Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
LOGGER |
Constructor and Description |
---|
WadlGeneratorLoader() |
Modifier and Type | Method and Description |
---|---|
private static java.lang.reflect.Method |
getMethodByName(java.lang.String methodName,
java.lang.Class<?> clazz) |
private static WadlGeneratorLoader.WadlGeneratorControl |
loadWadlGenerator(InjectionManager injectionManager,
WadlGeneratorDescription wadlGeneratorDescription,
WadlGenerator wadlGeneratorDelegate) |
(package private) static WadlGenerator |
loadWadlGeneratorDescriptions(InjectionManager injectionManager,
java.util.List<WadlGeneratorDescription> wadlGeneratorDescriptions) |
(package private) static WadlGenerator |
loadWadlGeneratorDescriptions(InjectionManager injectionManager,
WadlGeneratorDescription... wadlGeneratorDescriptions) |
(package private) static WadlGenerator |
loadWadlGenerators(java.util.List<WadlGenerator> wadlGenerators) |
private static WadlGeneratorLoader.Callback |
setProperty(java.lang.Object generator,
java.lang.String propertyName,
java.lang.Object propertyValue,
java.lang.Class<?> osgiConfigClass)
Set the object (generator) property with the given name to the specified value.
|
static WadlGenerator loadWadlGenerators(java.util.List<WadlGenerator> wadlGenerators) throws java.lang.Exception
java.lang.Exception
static WadlGenerator loadWadlGeneratorDescriptions(InjectionManager injectionManager, WadlGeneratorDescription... wadlGeneratorDescriptions) throws java.lang.Exception
java.lang.Exception
static WadlGenerator loadWadlGeneratorDescriptions(InjectionManager injectionManager, java.util.List<WadlGeneratorDescription> wadlGeneratorDescriptions) throws java.lang.Exception
java.lang.Exception
private static WadlGeneratorLoader.WadlGeneratorControl loadWadlGenerator(InjectionManager injectionManager, WadlGeneratorDescription wadlGeneratorDescription, WadlGenerator wadlGeneratorDelegate) throws java.lang.Exception
java.lang.Exception
private static WadlGeneratorLoader.Callback setProperty(java.lang.Object generator, java.lang.String propertyName, java.lang.Object propertyValue, java.lang.Class<?> osgiConfigClass) throws java.lang.Exception
generator
- the object, on which the property shall be setpropertyName
- the name of the property, that shall be setpropertyValue
- the value to populate the property withWadlGeneratorLoader.Callback
object that must be called later, or null if no callback is required.java.lang.Exception
- if s.th. goes wrongprivate static java.lang.reflect.Method getMethodByName(java.lang.String methodName, java.lang.Class<?> clazz)