Package net.bytebuddy.implementation
Interface Implementation.SpecialMethodInvocation
- All Superinterfaces:
StackManipulation
- All Known Implementing Classes:
Implementation.SpecialMethodInvocation.AbstractBase
,Implementation.SpecialMethodInvocation.Illegal
,Implementation.SpecialMethodInvocation.Simple
,RebaseImplementationTarget.RebasedMethodInvocation
- Enclosing interface:
Implementation
Represents a type-specific method invocation on the current instrumented type which is not legal from outside
the type such as a super method or default method invocation. Legal instances of special method invocations must
be equal to one another if they represent the same invocation target.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
An abstract base implementation of a valid special method invocation.static enum
A canonical implementation of an illegalImplementation.SpecialMethodInvocation
.static class
A canonical implementation of aImplementation.SpecialMethodInvocation
.Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
StackManipulation.Compound, StackManipulation.Size, StackManipulation.Trivial
-
Method Summary
Modifier and TypeMethodDescriptionReturns the method that represents this special method invocation.Returns the target type the represented method is invoked on.Returns a method handle representing this special method invocation.Checks that this special method invocation is compatible with the supplied type representation.Methods inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
apply, isValid
-
Method Details
-
getMethodDescription
MethodDescription getMethodDescription()Returns the method that represents this special method invocation. This method can be different even for equal special method invocations, dependent on the method that was used to request such an invocation by the means of aImplementation.Target
.- Returns:
- The method description that describes this instances invocation target.
-
getTypeDescription
TypeDescription getTypeDescription()Returns the target type the represented method is invoked on.- Returns:
- The type the represented method is invoked on.
-
withCheckedCompatibilityTo
Implementation.SpecialMethodInvocation withCheckedCompatibilityTo(MethodDescription.TypeToken token) Checks that this special method invocation is compatible with the supplied type representation.- Parameters:
token
- The type token to check against.- Returns:
- This special method invocation or an illegal invocation if the method invocation is not applicable.
-
toMethodHandle
JavaConstant.MethodHandle toMethodHandle()Returns a method handle representing this special method invocation.- Returns:
- A method handle for this special method invocation.
-