org.apache.felix.scr.annotations
Enum ReferenceCardinality

java.lang.Object
  extended by java.lang.Enum<ReferenceCardinality>
      extended by org.apache.felix.scr.annotations.ReferenceCardinality
All Implemented Interfaces:
Serializable, Comparable<ReferenceCardinality>

public enum ReferenceCardinality
extends Enum<ReferenceCardinality>

Options for Reference.cardinality() property.


Enum Constant Summary
MANDATORY_MULTIPLE
          Mandatory, multiple reference: At least one service must be available for the reference to be satisified.
MANDATORY_UNARY
          Mandatory, unary reference: At least one service must be available for the reference to be satisfied.
OPTIONAL_MULTIPLE
          Optional, multiple reference: No service required to be available for the refernce to be satisfied.
OPTIONAL_UNARY
          Optional, unary reference: No service required to be available for the refernce to be satisfied.
 
Method Summary
 String getCardinalityString()
           
static ReferenceCardinality valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ReferenceCardinality[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

OPTIONAL_UNARY

public static final ReferenceCardinality OPTIONAL_UNARY
Optional, unary reference: No service required to be available for the refernce to be satisfied. Only a single service is available through this reference.


MANDATORY_UNARY

public static final ReferenceCardinality MANDATORY_UNARY
Mandatory, unary reference: At least one service must be available for the reference to be satisfied. Only a single service is available through this reference.


OPTIONAL_MULTIPLE

public static final ReferenceCardinality OPTIONAL_MULTIPLE
Optional, multiple reference: No service required to be available for the refernce to be satisfied. All matching services are available through this reference.


MANDATORY_MULTIPLE

public static final ReferenceCardinality MANDATORY_MULTIPLE
Mandatory, multiple reference: At least one service must be available for the reference to be satisified. All matching services are available through this reference.

Method Detail

values

public static ReferenceCardinality[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ReferenceCardinality c : ReferenceCardinality.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ReferenceCardinality valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getCardinalityString

public String getCardinalityString()
Returns:
String representation of cardinality


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.