org.jboss.aop.microcontainer.annotations
Enum DisabledType

java.lang.Object
  extended by java.lang.Enum<DisabledType>
      extended by org.jboss.aop.microcontainer.annotations.DisabledType
All Implemented Interfaces:
Serializable, Comparable<DisabledType>

public enum DisabledType
extends Enum<DisabledType>

Fine grained disable type. e.g. LIFECYCLE only disable aop lifecycle callbacks

Author:
Ales Justin

Enum Constant Summary
ALL
           
LIFECYCLE
           
POINTCUTS
           
 
Method Summary
 boolean isDisabled(DisabledType constraint)
          Is the type disabled for this constraint.
static boolean isDisabled(DisabledType[] values, DisabledType constraint)
          Do values mark disabled usage.
 boolean isEnabled(DisabledType constraint)
          Is the type enabled for this constraint.
static boolean isEnabled(DisabledType[] values, DisabledType constraint)
          Do values mark enabled usage.
static DisabledType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DisabledType[] 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

ALL

public static final DisabledType ALL

LIFECYCLE

public static final DisabledType LIFECYCLE

POINTCUTS

public static final DisabledType POINTCUTS
Method Detail

values

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

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

valueOf

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

isDisabled

public boolean isDisabled(DisabledType constraint)
Is the type disabled for this constraint.

Parameters:
constraint - the constraint
Returns:
true if disabled for this constraint

isEnabled

public boolean isEnabled(DisabledType constraint)
Is the type enabled for this constraint.

Parameters:
constraint - the constraint
Returns:
true if enabled for this constraint

isDisabled

public static boolean isDisabled(DisabledType[] values,
                                 DisabledType constraint)
Do values mark disabled usage.

Parameters:
values - the disabled values
constraint - the constraint
Returns:
true if disabled for this constraint, false otherwise

isEnabled

public static boolean isEnabled(DisabledType[] values,
                                DisabledType constraint)
Do values mark enabled usage.

Parameters:
values - the disabled values
constraint - the constraint
Returns:
true if enabled for this constraint, false otherwise


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