net.dpml.annotation
Enum LifestylePolicy

java.lang.Object
  extended by java.lang.Enum<LifestylePolicy>
      extended by net.dpml.annotation.LifestylePolicy
All Implemented Interfaces:
Serializable, Comparable<LifestylePolicy>

public enum LifestylePolicy
extends Enum<LifestylePolicy>

Lifecycle policy.

Version:
2.0.1
Author:
Digital Product Management Laboratory

Enum Constant Summary
SINGLETON
          Declares that a single instance created from the component class shall be shared across all instance requests.
THREAD
          Declares that a new instance of the class shall be created for each thread context.
TRANSIENT
          Declares that a new instance shall be created per request.
 
Method Summary
static LifestylePolicy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LifestylePolicy[] 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

SINGLETON

public static final LifestylePolicy SINGLETON
Declares that a single instance created from the component class shall be shared across all instance requests. Components declaring this policy must ensure that implementations are threadsafe.


THREAD

public static final LifestylePolicy THREAD
Declares that a new instance of the class shall be created for each thread context.


TRANSIENT

public static final LifestylePolicy TRANSIENT
Declares that a new instance shall be created per request.

Method Detail

values

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

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

valueOf

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