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 theConfiguredBy
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
-
-
Field Summary
Fields Modifier and Type Fields Description static java.lang.String
BEAN_KEY
This value can be used to indicate that the injection point should be the whole beanstatic java.lang.String
INSTANCE
This value can be used to indicate that the injection point should be given the instance name.static java.lang.String
TYPE
This value can be used to indicate that the injection point should be given the type name.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Dynamicity
dynamicity
Describes how dynamic a configured field or parameter must be.java.lang.String
value
The name of the field in the java bean or bean-like map to use for injecting into this field or parameter.
-
-
-
Element Detail
-
value
java.lang.String value
The 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 "$bean" 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 dynamicity
Describes 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:
- org.glassfish.hk2.configuration.api.Dynamicity.STATIC
-
-