net.grinder.util.weave
Enum Weaver.TargetSource

java.lang.Object
  extended by java.lang.Enum<Weaver.TargetSource>
      extended by net.grinder.util.weave.Weaver.TargetSource
All Implemented Interfaces:
Serializable, Comparable<Weaver.TargetSource>
Enclosing interface:
Weaver

public static enum Weaver.TargetSource
extends Enum<Weaver.TargetSource>

Source of the target object that the weaving will pass on to the advice.


Enum Constant Summary
CLASS
          The class is the target object.
FIRST_PARAMETER
          The first parameter is the target object.
SECOND_PARAMETER
          The second parameter is the target object.
THIRD_PARAMETER
          The third parameter is the target object.
 
Method Summary
 boolean canApply(Method method)
          Whether this target source can be used to instrument a given method.
static Weaver.TargetSource valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Weaver.TargetSource[] 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

CLASS

public static final Weaver.TargetSource CLASS
The class is the target object.


FIRST_PARAMETER

public static final Weaver.TargetSource FIRST_PARAMETER
The first parameter is the target object. For non-static methods, the first parameter is this.


SECOND_PARAMETER

public static final Weaver.TargetSource SECOND_PARAMETER
The second parameter is the target object. For non-static methods, the first parameter is this.


THIRD_PARAMETER

public static final Weaver.TargetSource THIRD_PARAMETER
The third parameter is the target object. For non-static methods, the first parameter is this.

Method Detail

values

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

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

valueOf

public static Weaver.TargetSource 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

canApply

public boolean canApply(Method method)
Whether this target source can be used to instrument a given method.

Parameters:
method - The method to test.
Returns:
true if the source can be used.


Copyright © 2000-2013. All Rights Reserved.