Class MethodRebaseResolver.Resolution.Preserved
- java.lang.Object
-
- net.bytebuddy.dynamic.scaffold.inline.MethodRebaseResolver.Resolution.Preserved
-
- All Implemented Interfaces:
MethodRebaseResolver.Resolution
- Enclosing interface:
- MethodRebaseResolver.Resolution
@Enhance public static class MethodRebaseResolver.Resolution.Preserved extends java.lang.Object implements MethodRebaseResolver.Resolution
AMethodRebaseResolver.Resolution
of a non-rebased method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.inline.MethodRebaseResolver.Resolution
MethodRebaseResolver.Resolution.ForRebasedConstructor, MethodRebaseResolver.Resolution.ForRebasedMethod, MethodRebaseResolver.Resolution.Preserved
-
-
Field Summary
Fields Modifier and Type Field Description private MethodDescription.InDefinedShape
methodDescription
The preserved method.
-
Constructor Summary
Constructors Constructor Description Preserved(MethodDescription.InDefinedShape methodDescription)
Creates a newMethodRebaseResolver.Resolution
for a non-rebased method.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StackManipulation
getAdditionalArguments()
A rebased method might require additional arguments in order to create a distinct signature.MethodDescription.InDefinedShape
getResolvedMethod()
Returns the resolved method if this resolution represents a rebased method or the original method.boolean
isRebased()
Checks if this resolution represents a rebased method.
-
-
-
Field Detail
-
methodDescription
private final MethodDescription.InDefinedShape methodDescription
The preserved method.
-
-
Constructor Detail
-
Preserved
public Preserved(MethodDescription.InDefinedShape methodDescription)
Creates a newMethodRebaseResolver.Resolution
for a non-rebased method.- Parameters:
methodDescription
- The preserved method.
-
-
Method Detail
-
isRebased
public boolean isRebased()
Checks if this resolution represents a rebased method.- Specified by:
isRebased
in interfaceMethodRebaseResolver.Resolution
- Returns:
true
if this resolution requires to rebase a method.
-
getResolvedMethod
public MethodDescription.InDefinedShape getResolvedMethod()
Returns the resolved method if this resolution represents a rebased method or the original method.- Specified by:
getResolvedMethod
in interfaceMethodRebaseResolver.Resolution
- Returns:
- The resolved method if this resolution represents a rebased method or the original method.
-
getAdditionalArguments
public StackManipulation getAdditionalArguments()
A rebased method might require additional arguments in order to create a distinct signature. The stack manipulation that is returned from this method loads these arguments onto the operand stack. For a non-rebased method, this method throws anIllegalArgumentException
.- Specified by:
getAdditionalArguments
in interfaceMethodRebaseResolver.Resolution
- Returns:
- A stack manipulation that loaded the additional arguments onto the stack, if any.
-
-