Package org.osgi.service.cdi.annotations
Annotation Type PID
-
@Documented @Qualifier @Repeatable(PIDs.class) @Retention(RUNTIME) @Target({FIELD,METHOD,PARAMETER,TYPE}) public @interface PID
Annotation used in collaboration withComponentScoped
to specify singleton configurations and their policy.- Author:
- $Id: 6a1aba88c591f02759e28afd80ff6bcdb49156d0 $
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description ConfigurationPolicy
policy
The configuration policy associated with this PID.java.lang.String
value
The configuration PID for the configuration of this Component.
-
-
-
Element Detail
-
value
java.lang.String value
The configuration PID for the configuration of this Component.The value specifies a configuration PID who's configuration properties are available at injection points in the component.
A special string (
"$"
) can be used to specify the name of the component as a configuration PID. TheCDI_COMPONENT_NAME
constant holds this special string.For example:
@PID(CDI_COMPONENT_NAME)
- Default:
- "$"
-
-
-
policy
ConfigurationPolicy policy
The configuration policy associated with this PID.Controls how the configuration must be satisfied depending on the presence and type of a corresponding Configuration object in the OSGi Configuration Admin service. Corresponding configuration is a Configuration object where the PID is equal to
value
.If not specified, the configuration is not required.
- Default:
- org.osgi.service.cdi.ConfigurationPolicy.OPTIONAL
-
-