Top Description Fields Constructors Methods
org.osgi.service.component.annotations

public final Enum ReferenceCardinality

extends Enum<ReferenceCardinality>
Class Inheritance

Cardinality for the Reference annotation.

Specifies if the reference is optional and if the component implementation support a single bound service or multiple bound services.

Author
$Id: 332e7edb732890a5a87b3cb436bef101fab1cb57 $

Field Summary

Modifier and TypeField and Description
public static final ReferenceCardinality
AT_LEAST_ONE

The reference is mandatory and multiple.

public static final ReferenceCardinality
MANDATORY

The reference is mandatory and unary.

public static final ReferenceCardinality
MULTIPLE

The reference is optional and multiple.

public static final ReferenceCardinality
OPTIONAL

The reference is optional and unary.

private final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration.

public static ReferenceCardinality
public static ReferenceCardinality[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

AT_LEAST_ONEback to summary
public static final ReferenceCardinality AT_LEAST_ONE

The reference is mandatory and multiple. That is, the reference has a cardinality of 1..n.

MANDATORYback to summary
public static final ReferenceCardinality MANDATORY

The reference is mandatory and unary. That is, the reference has a cardinality of 1..1.

MULTIPLEback to summary
public static final ReferenceCardinality MULTIPLE

The reference is optional and multiple. That is, the reference has a cardinality of 0..n.

OPTIONALback to summary
public static final ReferenceCardinality OPTIONAL

The reference is optional and unary. That is, the reference has a cardinality of 0..1.

valueback to summary
private final String value

Constructor Detail

ReferenceCardinalityback to summary
private ReferenceCardinality(String value)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Enum.toString.

Doc from java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists.

Returns:String

the name of this enum constant

Annotations
@Override
valueOfback to summary
public static ReferenceCardinality valueOf(String name)
valuesback to summary
public static ReferenceCardinality[] values()