Package org.osgi.service.cdi.annotations
Annotation Interface PID
@Documented
@Qualifier
@Repeatable(PIDs.class)
@Retention(RUNTIME)
@Target({FIELD,METHOD,PARAMETER,TYPE})
public @interface PID
Annotation used in collaboration with
ComponentScoped
to specify
singleton configurations and their policy.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Support inline instantiation of thePID
annotation. -
Optional Element Summary
Modifier and TypeOptional ElementDescriptionThe configuration policy associated with this PID.The configuration PID for the configuration of this Component.
-
Element Details
-
value
String valueThe 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 policyThe 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:
- OPTIONAL
-