Class MethodRebaseResolver.Resolution.ForRebasedConstructor
java.lang.Object
net.bytebuddy.dynamic.scaffold.inline.MethodRebaseResolver.Resolution.ForRebasedConstructor
- All Implemented Interfaces:
MethodRebaseResolver.Resolution
- Enclosing interface:
MethodRebaseResolver.Resolution
@Enhance
public static class MethodRebaseResolver.Resolution.ForRebasedConstructor
extends Object
implements MethodRebaseResolver.Resolution
A
MethodRebaseResolver.Resolution of a rebased constructor.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classAn description of a rebased constructor.Nested classes/interfaces inherited from interface MethodRebaseResolver.Resolution
MethodRebaseResolver.Resolution.ForRebasedConstructor, MethodRebaseResolver.Resolution.ForRebasedMethod, MethodRebaseResolver.Resolution.Preserved -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MethodDescription.InDefinedShapeThe rebased constructor.private final TypeDescriptionThe placeholder type that is prepended to the constructor signature. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedForRebasedConstructor(MethodDescription.InDefinedShape methodDescription, TypeDescription placeholderType) Creates a new resolution for a rebased constructor. -
Method Summary
Modifier and TypeMethodDescriptionA rebased method might require additional arguments in order to create a distinct signature.Returns the resolved method if this resolution represents a rebased method or the original method.booleanChecks if this resolution represents a rebased method.of(MethodDescription.InDefinedShape methodDescription, TypeDescription placeholderType) Resolves a constructor rebasement.
-
Field Details
-
methodDescription
The rebased constructor. -
placeholderType
The placeholder type that is prepended to the constructor signature.
-
-
Constructor Details
-
ForRebasedConstructor
protected ForRebasedConstructor(MethodDescription.InDefinedShape methodDescription, TypeDescription placeholderType) Creates a new resolution for a rebased constructor.- Parameters:
methodDescription- The rebased constructor.placeholderType- The placeholder type that is prepended to the constructor signature.
-
-
Method Details
-
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()Checks if this resolution represents a rebased method.- Specified by:
isRebasedin interfaceMethodRebaseResolver.Resolution- Returns:
trueif this resolution requires to rebase a method.
-
getResolvedMethod
Returns the resolved method if this resolution represents a rebased method or the original method.- Specified by:
getResolvedMethodin interfaceMethodRebaseResolver.Resolution- Returns:
- The resolved method if this resolution represents a rebased method or the original method.
-
getAppendedParameters
A rebased method might require additional arguments in order to create a distinct signature.- Specified by:
getAppendedParametersin interfaceMethodRebaseResolver.Resolution- Returns:
- A list of parameters that were appended to the rebased method or constructor.
-