When the annotation is applied to a method, the method is the bind method of the reference.
When the annotation is applied to a field, the field will contain the bound service(s) of the reference.
When the annotation is applied to a parameter of a constructor, the parameter will contain the bound service(s) of the reference.
This annotation is not processed at runtime by Service Component Runtime. It must be processed by tools and used to add a Component Description to the bundle.
In the generated Component Description for a component, the references must
be ordered in ascending lexicographical order (using String.compareTo
) of the reference names.
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public ReferenceCardinality | |
| public CollectionType | |
| public String | |
| public FieldOption | |
| public String | |
| public int | |
| public ReferencePolicy | |
| public ReferencePolicyOption | |
| public ReferenceScope | |
| public Class | |
| public String | |
| public String | |
| public String |
| bind | back to summary |
|---|---|
| public String bind() The name of the bind method for this reference. If specified and this reference annotates a method, the specified name must match the name of the annotated method. If not specified, the name of the bind method is based upon how this annotation is used:
If there is a bind method name, the component must contain a method with that name.
| |
| cardinality | back to summary |
|---|---|
| public ReferenceCardinality cardinality() The cardinality of this reference. If not specified, the cardinality of this reference is based upon how this annotation is used:
| |
| collectionType | back to summary |
|---|---|
| public CollectionType collectionType() The collection type for this reference. If not specified, the collection type is based upon how this annotation is used:
| |
| field | back to summary |
|---|---|
| public String field() The name of the field for this reference. If specified and this reference annotates a field, the specified name must match the name of the annotated field. If not specified, the name of the field is based upon how this annotation is used:
If there is a field name, the component must contain a field with that name.
| |
| fieldOption | back to summary |
|---|---|
| public FieldOption fieldOption() The field option for this reference. If not specified, the field option is based upon how this annotation is used:
| |
| name | back to summary |
|---|---|
| public String name() The name of this reference.
The name of this reference must be specified when using this annotation
in the
| |
| parameter | back to summary |
|---|---|
| public int parameter() The zero-based parameter number of the constructor parameter for this reference. If specified and this reference annotates an constructor parameter, the specified value must match the zero-based parameter number of the annotated constructor parameter. If not specified, the parameter number is based upon how this annotation is used:
If there is a parameter number, the component must declare a constructor that has a parameter having the zero-based parameter number.
| |
| policy | back to summary |
|---|---|
| public ReferencePolicy policy() The policy for this reference. If not specified, the policy of this reference is based upon how this annotation is used:
| |
| policyOption | back to summary |
|---|---|
| public ReferencePolicyOption policyOption() The policy option for this reference.
If not specified, the
| |
| scope | back to summary |
|---|---|
| public ReferenceScope scope() The reference scope for this reference.
If not specified, the
| |
| service | back to summary |
|---|---|
| public Class The type of the service for this reference.
The type of the service for this reference must be specified when using
this annotation in the If not specified, the type of the service for this reference is based upon how this annotation is used:
| |
| target | back to summary |
|---|---|
| public String target() The target property for this reference.
If not specified, no target property is set. A target property must be
specified if the
| |
| unbind | back to summary |
|---|---|
| public String unbind() The name of the unbind method for this reference. If not specified, the name of the unbind method is based upon how this annotation is used:
If there is an unbind method name, the component must contain a method with that name.
| |
| updated | back to summary |
|---|---|
| public String updated() The name of the updated method for this reference. If not specified, the name of the updated method is based upon how this annotation is used:
If there is an updated method name, the component must contain a method with that name.
| |