Package net.bytebuddy.implementation
Class MethodCall.TargetHandler.ForConstructingInvocation
- java.lang.Object
-
- net.bytebuddy.implementation.MethodCall.TargetHandler.ForConstructingInvocation
-
- All Implemented Interfaces:
MethodCall.TargetHandler
,MethodCall.TargetHandler.Resolved
- Enclosing interface:
- MethodCall.TargetHandler
@Enhance public static class MethodCall.TargetHandler.ForConstructingInvocation extends java.lang.Object implements MethodCall.TargetHandler, MethodCall.TargetHandler.Resolved
Invokes a method in order to construct a new instance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
MethodCall.TargetHandler.ForConstructingInvocation.Factory
A target handler factory for a constructor invocation.-
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 TypeDescription
instrumentedType
The instrumented type.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForConstructingInvocation(TypeDescription instrumentedType)
Creates a new target handle constructor invocation.
-
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.
-
-
-
Field Detail
-
instrumentedType
private final TypeDescription instrumentedType
The instrumented type.
-
-
Constructor Detail
-
ForConstructingInvocation
protected ForConstructingInvocation(TypeDescription instrumentedType)
Creates a new target handle constructor invocation.- Parameters:
instrumentedType
- The instrumented type.
-
-
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.
-
-