@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface ConfigurationProperty
This annotation provides the ability to specify the type contained in java.util.Collection
for multivalued configuration properties.
To map an attribute named X (case is ignored) in the raw properties, define a method named getX()
in the Java configuration interface. Name the method isX()
if the attribute is of type boolean.
The type of the attribute is specified by the returned type of the method defined in the Java configuration interface. To parse the raw value of the attribute, the method valueOf(String)
of the specified type is used. If the attribute named X is of type String, then it is defined by String getX()
and the value available in the raw properties in the form x=<value>
will be parsed by calling String.valueOf(<value>)
.
Supported types are:
valueOf(String)
with a returned type that is of type of the class that defines the method.oracle.oud.type.DN
An attribute that is multi-valued is defined with the type java.util.Collection. But as the java generic feature is not available at runtime, the type of the attribute must be defined using this annotation. If no annotation is provided, the default type is java.lang.String.
Collection getY()
returns a collection of String
Collection<String> getY()
returns a collection of String
Collection<oracle.oud.type.DN> getY()
returns a collection of String
Collection<oracle.oud.type.DN> getY()
with the annotation @ConfigurationProperty(type="oracle.oud.type.DN")
returns a collection of oracle.oud.type.DN.
AbstractPlugin.getConfiguration(Class)
.Modifier and Type | Required Element and Description |
---|---|
java.lang.String |
type
Returns the type of the property contained in the java.util.Collection.
|