org.jboss.aop
Enum AdviceType

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

public enum AdviceType
extends Enum<AdviceType>

Indicates whether the type of an advice is before, around, after, throwing or finally.
Notice that interceptors are a special type of around advices.
Use this class to specify the type of the advice on a Bind annotation.

Version:
$Revision: 1.1 $
Author:
Kabir Khan
See Also:
Bind

Enum Constant Summary
AFTER
          Advice will be invoked after the joinpoint execution, only if it returns normally.
AROUND
          Advice will be invoked before the joinpoint execution.
BEFORE
          Advice will be invoked around the joinpoint execution, and as such is responsible for invoking the next advice in the chain and returning the joinpoint result value.
FINALLY
          Advice will be invoked after the joinpoint execution, regardless of how it returns.
THROWING
          Advice will be invoked after the joinpoint execution, only if it throws an exception.
 
Method Summary
static AdviceType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static AdviceType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AROUND

public static final AdviceType AROUND
Advice will be invoked before the joinpoint execution.


BEFORE

public static final AdviceType BEFORE
Advice will be invoked around the joinpoint execution, and as such is responsible for invoking the next advice in the chain and returning the joinpoint result value.


AFTER

public static final AdviceType AFTER
Advice will be invoked after the joinpoint execution, only if it returns normally.


THROWING

public static final AdviceType THROWING
Advice will be invoked after the joinpoint execution, only if it throws an exception.


FINALLY

public static final AdviceType FINALLY
Advice will be invoked after the joinpoint execution, regardless of how it returns.

Method Detail

values

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

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

valueOf

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


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