Package net.bytebuddy.asm
Enum Advice.Dispatcher.RelocationHandler.ForValue
- java.lang.Object
-
- java.lang.Enum<Advice.Dispatcher.RelocationHandler.ForValue>
-
- net.bytebuddy.asm.Advice.Dispatcher.RelocationHandler.ForValue
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Advice.Dispatcher.RelocationHandler.ForValue>,Advice.Dispatcher.RelocationHandler
- Enclosing interface:
- Advice.Dispatcher.RelocationHandler
public static enum Advice.Dispatcher.RelocationHandler.ForValue extends java.lang.Enum<Advice.Dispatcher.RelocationHandler.ForValue> implements Advice.Dispatcher.RelocationHandler
A relocation handler that triggers a relocation for a default or non-default value.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAdvice.Dispatcher.RelocationHandler.ForValue.BoundA bound relocation handler forAdvice.Dispatcher.RelocationHandler.ForValue.protected classAdvice.Dispatcher.RelocationHandler.ForValue.InvertedAn inverted version of the outer relocation handler.-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.Dispatcher.RelocationHandler
Advice.Dispatcher.RelocationHandler.Disabled, Advice.Dispatcher.RelocationHandler.ForType, Advice.Dispatcher.RelocationHandler.ForValue, Advice.Dispatcher.RelocationHandler.Relocation
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DOUBLEA relocation handler for adoubletype.FLOATA relocation handler for afloattype.INTEGERA relocation handler for aninttype or any compatible type.LONGA relocation handler for alongtype.REFERENCEA relocation handler for a reference type.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Advice.Dispatcher.RelocationHandler.Boundbind(MethodDescription instrumentedMethod, Advice.Dispatcher.RelocationHandler.Relocation relocation)Binds this relocation handler to a relocation dispatcher.protected abstract voidconvertValue(org.objectweb.asm.MethodVisitor methodVisitor, Advice.MethodSizeHandler.ForAdvice methodSizeHandler)Applies a value conversion prior to a applying a conditional jump.protected static Advice.Dispatcher.RelocationHandlerof(TypeDefinition typeDefinition, boolean inverted)Resolves a relocation handler for a given type.static Advice.Dispatcher.RelocationHandler.ForValuevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Advice.Dispatcher.RelocationHandler.ForValue[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INTEGER
public static final Advice.Dispatcher.RelocationHandler.ForValue INTEGER
A relocation handler for aninttype or any compatible type.
-
LONG
public static final Advice.Dispatcher.RelocationHandler.ForValue LONG
A relocation handler for alongtype.
-
FLOAT
public static final Advice.Dispatcher.RelocationHandler.ForValue FLOAT
A relocation handler for afloattype.
-
DOUBLE
public static final Advice.Dispatcher.RelocationHandler.ForValue DOUBLE
A relocation handler for adoubletype.
-
REFERENCE
public static final Advice.Dispatcher.RelocationHandler.ForValue REFERENCE
A relocation handler for a reference type.
-
-
Method Detail
-
values
public static Advice.Dispatcher.RelocationHandler.ForValue[] 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 (Advice.Dispatcher.RelocationHandler.ForValue c : Advice.Dispatcher.RelocationHandler.ForValue.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Advice.Dispatcher.RelocationHandler.ForValue valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
of
protected static Advice.Dispatcher.RelocationHandler of(TypeDefinition typeDefinition, boolean inverted)
Resolves a relocation handler for a given type.- Parameters:
typeDefinition- The type to be resolved for a relocation attempt.inverted-trueif the relocation should be applied for any non-default value of a type.- Returns:
- An appropriate relocation handler.
-
convertValue
protected abstract void convertValue(org.objectweb.asm.MethodVisitor methodVisitor, Advice.MethodSizeHandler.ForAdvice methodSizeHandler)Applies a value conversion prior to a applying a conditional jump.- Parameters:
methodVisitor- The method visitor to use.methodSizeHandler- The method size handler to use.
-
bind
public Advice.Dispatcher.RelocationHandler.Bound bind(MethodDescription instrumentedMethod, Advice.Dispatcher.RelocationHandler.Relocation relocation)
Description copied from interface:Advice.Dispatcher.RelocationHandlerBinds this relocation handler to a relocation dispatcher.- Specified by:
bindin interfaceAdvice.Dispatcher.RelocationHandler- Parameters:
instrumentedMethod- The instrumented method.relocation- The relocation to apply.- Returns:
- A bound relocation handler.
-
-