Package net.bytebuddy.implementation
Class MethodCall.TargetHandler.ForField
- java.lang.Object
-
- net.bytebuddy.implementation.MethodCall.TargetHandler.ForField
-
- All Implemented Interfaces:
MethodCall.TargetHandler,MethodCall.TargetHandler.Resolved
- Enclosing interface:
- MethodCall.TargetHandler
@Enhance public static class MethodCall.TargetHandler.ForField extends java.lang.Object implements MethodCall.TargetHandler, MethodCall.TargetHandler.Resolved
Creates a target handler that stores the instance to invoke a method on in an instance field.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classMethodCall.TargetHandler.ForField.FactoryA factory for a field access.protected static interfaceMethodCall.TargetHandler.ForField.LocationA location of a field.-
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
-
-
Field Summary
Fields Modifier and Type Field Description private FieldDescriptionfieldDescriptionA description of the field that is the target.
-
Constructor Summary
Constructors Modifier Constructor Description protectedForField(FieldDescription fieldDescription)Creates a new target handler for a field description.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeDescriptiongetTypeDescription()Returns the target's type description.MethodCall.TargetHandler.Resolvedresolve(MethodDescription instrumentedMethod)Resolves this target handler.StackManipulationtoStackManipulation(MethodDescription invokedMethod, Assigner assigner, Assigner.Typing typing)Creates a stack manipulation to represent this resolved target handler.
-
-
-
Field Detail
-
fieldDescription
private final FieldDescription fieldDescription
A description of the field that is the target.
-
-
Constructor Detail
-
ForField
protected ForField(FieldDescription fieldDescription)
Creates a new target handler for a field description.- Parameters:
fieldDescription- A description of the field that is the target.
-
-
Method Detail
-
resolve
public MethodCall.TargetHandler.Resolved resolve(MethodDescription instrumentedMethod)
Resolves this target handler.- Specified by:
resolvein interfaceMethodCall.TargetHandler- Parameters:
instrumentedMethod- The instrumented method.- Returns:
- The resolved target handler.
-
getTypeDescription
public TypeDescription getTypeDescription()
Returns the target's type description.- Specified by:
getTypeDescriptionin 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:
toStackManipulationin 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.
-
-