Package net.bytebuddy.implementation
Class MethodCall.TargetHandler.ForValue
- java.lang.Object
-
- net.bytebuddy.implementation.MethodCall.TargetHandler.ForValue
-
- All Implemented Interfaces:
MethodCall.TargetHandler
,MethodCall.TargetHandler.Resolved
- Enclosing interface:
- MethodCall.TargetHandler
@Enhance public static class MethodCall.TargetHandler.ForValue extends Object implements MethodCall.TargetHandler, MethodCall.TargetHandler.Resolved
A target handler that invokes a method on an instance that is stored in a static field.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
MethodCall.TargetHandler.ForValue.Factory
A factory for a target handler that loads a specific value.-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.MethodCall.TargetHandler
MethodCall.TargetHandler.ForConstructingInvocation, MethodCall.TargetHandler.ForField, MethodCall.TargetHandler.ForMethodCall, MethodCall.TargetHandler.ForMethodParameter, MethodCall.TargetHandler.ForSelfOrStaticInvocation, MethodCall.TargetHandler.ForValue, MethodCall.TargetHandler.Resolved, MethodCall.TargetHandler.Simple
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForValue(FieldDescription.InDefinedShape fieldDescription)
Creates a new target handler for a field value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeDescription
getTypeDescription()
Returns the target's type description.MethodCall.TargetHandler.Resolved
resolve(MethodDescription instrumentedMethod)
Resolves this target handler.StackManipulation
toStackManipulation(MethodDescription invokedMethod, Assigner assigner, Assigner.Typing typing)
Creates a stack manipulation to represent this resolved target handler.
-
-
-
Constructor Detail
-
ForValue
protected ForValue(FieldDescription.InDefinedShape fieldDescription)
Creates a new target handler for a field value.- Parameters:
fieldDescription
- A description of the field that contains the value.
-
-
Method Detail
-
resolve
public MethodCall.TargetHandler.Resolved resolve(MethodDescription instrumentedMethod)
Resolves this target handler.- Specified by:
resolve
in interfaceMethodCall.TargetHandler
- Parameters:
instrumentedMethod
- The instrumented method.- Returns:
- The resolved target handler.
-
getTypeDescription
public TypeDescription getTypeDescription()
Returns the target's type description.- Specified by:
getTypeDescription
in interfaceMethodCall.TargetHandler.Resolved
- Returns:
- The target's type description.
-
toStackManipulation
public StackManipulation toStackManipulation(MethodDescription invokedMethod, Assigner assigner, Assigner.Typing typing)
Creates a stack manipulation to represent this resolved target handler.- Specified by:
toStackManipulation
in interfaceMethodCall.TargetHandler.Resolved
- Parameters:
invokedMethod
- The invoked method.assigner
- The assigner to use.typing
- The typing to apply.- Returns:
- A stack manipulation that implements this target handler.
-
-