Class MethodRebaseResolver.Resolution.ForRebasedConstructor
- java.lang.Object
-
- net.bytebuddy.dynamic.scaffold.inline.MethodRebaseResolver.Resolution.ForRebasedConstructor
-
- All Implemented Interfaces:
MethodRebaseResolver.Resolution
- Enclosing interface:
- MethodRebaseResolver.Resolution
public static class MethodRebaseResolver.Resolution.ForRebasedConstructor extends java.lang.Object implements MethodRebaseResolver.Resolution
AMethodRebaseResolver.Resolution
of a rebased constructor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
MethodRebaseResolver.Resolution.ForRebasedConstructor.RebasedConstructor
An description of a rebased constructor.-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.inline.MethodRebaseResolver.Resolution
MethodRebaseResolver.Resolution.ForRebasedConstructor, MethodRebaseResolver.Resolution.ForRebasedMethod, MethodRebaseResolver.Resolution.Preserved
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForRebasedConstructor(MethodDescription.InDefinedShape methodDescription)
Creates a new resolution for a rebased constructor.
-
Method Summary
All Methods Static 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.static MethodRebaseResolver.Resolution
of(MethodDescription.InDefinedShape methodDescription, TypeDescription placeholderType)
Resolves a constructor rebasement.
-
-
-
Constructor Detail
-
ForRebasedConstructor
protected ForRebasedConstructor(MethodDescription.InDefinedShape methodDescription)
Creates a new resolution for a rebased constructor.- Parameters:
methodDescription
- The rebased constructor.
-
-
Method Detail
-
of
public static MethodRebaseResolver.Resolution of(MethodDescription.InDefinedShape methodDescription, TypeDescription placeholderType)
Resolves a constructor rebasement.- Parameters:
methodDescription
- The constructor to rebase.placeholderType
- The placeholder type to use to distinguish the constructor's signature.- Returns:
- A resolution of the provided constructor.
-
isRebased
public boolean isRebased()
Description copied from interface:MethodRebaseResolver.Resolution
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()
Description copied from interface:MethodRebaseResolver.Resolution
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()
Description copied from interface:MethodRebaseResolver.Resolution
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.
-
-