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 Object
implements MethodCall.TargetHandler, MethodCall.TargetHandler.Resolved
Invokes a method in order to construct a new instance.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static enumA target handler factory for a constructor invocation.Nested classes/interfaces inherited from interface 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 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedForConstructingInvocation(TypeDescription instrumentedType) Creates a new target handle constructor invocation. -
Method Summary
Modifier and TypeMethodDescriptionReturns the target's type description.resolve(MethodDescription instrumentedMethod) Resolves this target handler.toStackManipulation(MethodDescription invokedMethod, Assigner assigner, Assigner.Typing typing) Creates a stack manipulation to represent this resolved target handler.
-
Field Details
-
instrumentedType
The instrumented type.
-
-
Constructor Details
-
ForConstructingInvocation
Creates a new target handle constructor invocation.- Parameters:
instrumentedType- The instrumented type.
-
-
Method Details
-
resolve
Resolves this target handler.- Specified by:
resolvein interfaceMethodCall.TargetHandler- Parameters:
instrumentedMethod- The instrumented method.- Returns:
- The resolved target handler.
-
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.
-