Annotation Type Configured
@Documented
@Retention(RUNTIME)
@Target({FIELD,PARAMETER})
@InjectionPointIndicator
public @interface Configured
This annotation is placed on fields or on parameters
of methods or constructors to indicate that these
fields or parameters should come from the configuration
instance of the type defined by the
ConfiguredBy
annotation on the class.
The key field gives the name of the parameter to get from the java bean instance upon which the instance of this service is based. If the configuration bean is a java bean then a method name starting with "get" and having the key name (with the first letter capitalized) will be invoked to get the value. if the configuration bean is a map then the value of the key is the value of the key in the map from which to get the value
In the case of a field the key field can come from the name of the field (or can be explicitly set, which will override the name of the field). In the case of a parameter the key field must be filled in with the name of the field on the java bean to use to inject into this parameter
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionDescribes how dynamic a configured field or parameter must be.The name of the field in the java bean or bean-like map to use for injecting into this field or parameter. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
This value can be used to indicate that the injection point should be the whole beanstatic final String
This value can be used to indicate that the injection point should be given the instance name.static final String
This value can be used to indicate that the injection point should be given the type name.
-
Field Details
-
BEAN_KEY
This value can be used to indicate that the injection point should be the whole bean- See Also:
-
INSTANCE
This value can be used to indicate that the injection point should be given the instance name. The injection point must be of type String- See Also:
-
TYPE
This value can be used to indicate that the injection point should be given the type name. The injection point must be of type String- See Also:
-
-
Element Details
-
value
String valueThe name of the field in the java bean or bean-like map to use for injecting into this field or parameter. If this field is set to invalid input: '"'$beaninvalid input: '"' then the whole bean upon which this instance is based will be injected into this location- Returns:
- The name of the field to use for injecting into this field or parameter
- Default:
""
-
dynamicity
Dynamicity dynamicityDescribes how dynamic a configured field or parameter must be. All parameters of a constructor must be STATIC. All parameters of a method must have the same dynamicity value- Returns:
- The dynamicicty of this field or parameter
- Default:
STATIC
-