org.osgi.service.component.annotations
Enum ReferenceScope

java.lang.Object
  extended by java.lang.Enum<ReferenceScope>
      extended by org.osgi.service.component.annotations.ReferenceScope
All Implemented Interfaces:
Serializable, Comparable<ReferenceScope>

public enum ReferenceScope
extends Enum<ReferenceScope>

Reference scope for the Reference annotation.

Since:
1.3
Author:
$Id: 5d9e18110111f2cd044665cdd77d973db65bfd21 $

Enum Constant Summary
BUNDLE
          A single service object is used for all references to the service in this bundle.
PROTOTYPE
          If the referenced service has prototype service scope, then each instance of the component with this reference can receive a unique instance of the service.
 
Method Summary
 String toString()
           
static ReferenceScope valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ReferenceScope[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BUNDLE

public static final ReferenceScope BUNDLE
A single service object is used for all references to the service in this bundle.


PROTOTYPE

public static final ReferenceScope PROTOTYPE
If the referenced service has prototype service scope, then each instance of the component with this reference can receive a unique instance of the service. If the referenced service does not have prototype service scope, then no service object will be received.

Method Detail

values

public static ReferenceScope[] 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 (ReferenceScope c : ReferenceScope.values())
    System.out.println(c);

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

valueOf

public static ReferenceScope 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

toString

public String toString()
Overrides:
toString in class Enum<ReferenceScope>


Copyright © 2014 aQute SARL. All rights reserved.