To populate a object with properties from a ComponentConfiguration instance the class or a superclass of the object to populate has to provide at least one setter method with a single parameter. The object to populate is set via the {@link PropertyInjector#setTargetObject} method. The class of the objectwill be analyzed for setter methods having a "set" prefix in their method name. If one of the found setter methods is annotated with {@link org.apache.lucene.gdata.server.registry.configuration.Requiered} thisproperty is interpreted as a mandatory property. Mandatory properties must be available in the provided ComponentConfiguration, if not the injection will fail.
The {@link org.apache.lucene.gdata.server.registry.configuration.ComponentConfiguration}contains key / value pairs where the key must match the signature of the setter method without the 'set' prefix and must begin with a lower case character. KeybufferSize
does match a method signature of setBufferSize
The type of the parameter will be reflected via the Reflection API and instantiated with the given value if possible.
Setter methods without a Required
annotation will be set if the property is present in the ComponentConfiguration
This class does not support overloaded setter methods.
@author Simon Willnauer @see org.apache.lucene.gdata.server.registry.configuration.Requiered @see org.apache.lucene.gdata.server.registry.configuration.ComponentConfiguration
|
|