org.jboss.beans.metadata.api.model
Enum FromContext

java.lang.Object
  extended by java.lang.Enum<FromContext>
      extended by org.jboss.beans.metadata.api.model.FromContext
All Implemented Interfaces:
Serializable, Comparable<FromContext>

public enum FromContext
extends Enum<FromContext>

Inject from controller context: * name - controller context name * aliases - aliases * metadata - inject MetaData * beaninfo - BeanInfo * scope - ScopeKey * id - identifier * dynamic - method specific * ...

Author:
Ales Justin

Enum Constant Summary
ALIASES
           
BEANINFO
           
CONTEXT
           
ID
           
METADATA
           
NAME
           
NOOP
           
SCOPE
           
STATE
           
 
Method Summary
 Object executeLookup(ControllerContext context)
          Execute injection on context.
static FromContext getInstance(String fromString)
          Get the enum instance from string.
 ControllerState getWhenValid()
          When valid state.
static FromContext valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FromContext[] 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

NOOP

public static final FromContext NOOP

NAME

public static final FromContext NAME

ALIASES

public static final FromContext ALIASES

METADATA

public static final FromContext METADATA

BEANINFO

public static final FromContext BEANINFO

SCOPE

public static final FromContext SCOPE

STATE

public static final FromContext STATE

ID

public static final FromContext ID

CONTEXT

public static final FromContext CONTEXT
Method Detail

values

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

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

valueOf

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

getWhenValid

public ControllerState getWhenValid()
When valid state.

Returns:
the when valid state

executeLookup

public Object executeLookup(ControllerContext context)
                     throws Throwable
Execute injection on context.

Parameters:
context - the target context
Returns:
lookup value
Throws:
Throwable - for any error

getInstance

public static FromContext getInstance(String fromString)
Get the enum instance from string.

Parameters:
fromString - the type string
Returns:
from context enum instance


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.