net.sf.tie.ext.rule
Enum MethodInterceptionStrategy

java.lang.Object
  extended by java.lang.Enum<MethodInterceptionStrategy>
      extended by net.sf.tie.ext.rule.MethodInterceptionStrategy
All Implemented Interfaces:
Serializable, Comparable<MethodInterceptionStrategy>

public enum MethodInterceptionStrategy
extends Enum<MethodInterceptionStrategy>

Describes the strategy for how a given method should be intercepted.

See Also:
InterceptionRule

Enum Constant Summary
ALWAYS_INTERCEPT_IMPLEMENTATION_METHOD
          Calls to the given method should always be intercepted for this implementation class, but may not be intercepted on other implementations.
ALWAYS_INTERCEPT_INTERFACE_METHOD
          Calls to the given method (on the given interface) should always be intercepted, regardless of the implementation class or object.
DONT_INTERCEPT_THIS_CALL
          This specific method call should not be intercepted, but other calls to the same method, on the same objects may be.
INTERCEPT_THIS_CALL
          This specific method call should be intercepted, but other calls to the same method, on the same objects may not be.
NEVER_INTERCEPT_IMPLEMENTATION_METHOD
          Calls to the given method should never be intercepted for this implementation class, but may be intercepted on other implementations.
NEVER_INTERCEPT_INTERFACE_METHOD
          Calls to the given method (on the given interface) should never be intercepted, regardless of the implementation class or object.
 
Method Summary
static MethodInterceptionStrategy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static MethodInterceptionStrategy[] 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

NEVER_INTERCEPT_INTERFACE_METHOD

public static final MethodInterceptionStrategy NEVER_INTERCEPT_INTERFACE_METHOD
Calls to the given method (on the given interface) should never be intercepted, regardless of the implementation class or object.


NEVER_INTERCEPT_IMPLEMENTATION_METHOD

public static final MethodInterceptionStrategy NEVER_INTERCEPT_IMPLEMENTATION_METHOD
Calls to the given method should never be intercepted for this implementation class, but may be intercepted on other implementations.


ALWAYS_INTERCEPT_INTERFACE_METHOD

public static final MethodInterceptionStrategy ALWAYS_INTERCEPT_INTERFACE_METHOD
Calls to the given method (on the given interface) should always be intercepted, regardless of the implementation class or object.


ALWAYS_INTERCEPT_IMPLEMENTATION_METHOD

public static final MethodInterceptionStrategy ALWAYS_INTERCEPT_IMPLEMENTATION_METHOD
Calls to the given method should always be intercepted for this implementation class, but may not be intercepted on other implementations.


INTERCEPT_THIS_CALL

public static final MethodInterceptionStrategy INTERCEPT_THIS_CALL
This specific method call should be intercepted, but other calls to the same method, on the same objects may not be.


DONT_INTERCEPT_THIS_CALL

public static final MethodInterceptionStrategy DONT_INTERCEPT_THIS_CALL
This specific method call should not be intercepted, but other calls to the same method, on the same objects may be.

Method Detail

values

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

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

valueOf

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