Package net.bytebuddy.implementation
Class InvokeDynamic.InvocationProvider.Target.ForMethodDescription
- java.lang.Object
-
- net.bytebuddy.implementation.InvokeDynamic.InvocationProvider.Target.ForMethodDescription
-
- All Implemented Interfaces:
InvokeDynamic.InvocationProvider.Target
,InvokeDynamic.InvocationProvider.Target.Resolved
- Enclosing interface:
- InvokeDynamic.InvocationProvider.Target
public static class InvokeDynamic.InvocationProvider.Target.ForMethodDescription extends java.lang.Object implements InvokeDynamic.InvocationProvider.Target, InvokeDynamic.InvocationProvider.Target.Resolved
A target that requests to dynamically invoke a method to substitute for a given method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.InvokeDynamic.InvocationProvider.Target
InvokeDynamic.InvocationProvider.Target.ForMethodDescription, InvokeDynamic.InvocationProvider.Target.Resolved
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.InvokeDynamic.InvocationProvider.Target.Resolved
InvokeDynamic.InvocationProvider.Target.Resolved.Simple
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForMethodDescription(MethodDescription.InDefinedShape methodDescription)
Creates a new target for substituting a given method.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getInternalName()
Returns the internal name of the requested method.java.util.List<TypeDescription>
getParameterTypes()
Returns the types of the values on the operand stack.TypeDescription
getReturnType()
Returns the requested return type.StackManipulation
getStackManipulation()
Returns the stack manipulation that loads the arguments onto the operand stack.InvokeDynamic.InvocationProvider.Target.Resolved
resolve(TypeDescription instrumentedType, Assigner assigner, Assigner.Typing typing)
Resolves the target.
-
-
-
Constructor Detail
-
ForMethodDescription
protected ForMethodDescription(MethodDescription.InDefinedShape methodDescription)
Creates a new target for substituting a given method.- Parameters:
methodDescription
- The method that is being substituted.
-
-
Method Detail
-
resolve
public InvokeDynamic.InvocationProvider.Target.Resolved resolve(TypeDescription instrumentedType, Assigner assigner, Assigner.Typing typing)
Description copied from interface:InvokeDynamic.InvocationProvider.Target
Resolves the target.- Specified by:
resolve
in interfaceInvokeDynamic.InvocationProvider.Target
- Parameters:
instrumentedType
- The instrumented type.assigner
- The assigner to be used.typing
- Indicates if dynamic type castings should be attempted for incompatible assignments.- Returns:
- The resolved target.
-
getInternalName
public java.lang.String getInternalName()
Description copied from interface:InvokeDynamic.InvocationProvider.Target.Resolved
Returns the internal name of the requested method.- Specified by:
getInternalName
in interfaceInvokeDynamic.InvocationProvider.Target.Resolved
- Returns:
- The internal name of the requested method.
-
getReturnType
public TypeDescription getReturnType()
Description copied from interface:InvokeDynamic.InvocationProvider.Target.Resolved
Returns the requested return type.- Specified by:
getReturnType
in interfaceInvokeDynamic.InvocationProvider.Target.Resolved
- Returns:
- The requested return type.
-
getStackManipulation
public StackManipulation getStackManipulation()
Description copied from interface:InvokeDynamic.InvocationProvider.Target.Resolved
Returns the stack manipulation that loads the arguments onto the operand stack.- Specified by:
getStackManipulation
in interfaceInvokeDynamic.InvocationProvider.Target.Resolved
- Returns:
- The stack manipulation that loads the arguments onto the operand stack.
-
getParameterTypes
public java.util.List<TypeDescription> getParameterTypes()
Description copied from interface:InvokeDynamic.InvocationProvider.Target.Resolved
Returns the types of the values on the operand stack.- Specified by:
getParameterTypes
in interfaceInvokeDynamic.InvocationProvider.Target.Resolved
- Returns:
- The types of the values on the operand stack.
-
-