Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.Simple
- java.lang.Object
-
- net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.Simple
-
- All Implemented Interfaces:
MemberSubstitution.Substitution.Chain.Step,MemberSubstitution.Substitution.Chain.Step.Factory,MemberSubstitution.Substitution.Chain.Step.Resolution
- Enclosing interface:
- MemberSubstitution.Substitution.Chain.Step
@Enhance public static class MemberSubstitution.Substitution.Chain.Step.Simple extends java.lang.Object implements MemberSubstitution.Substitution.Chain.Step, MemberSubstitution.Substitution.Chain.Step.Resolution, MemberSubstitution.Substitution.Chain.Step.Factory
A simple substitution step within a substitution chain.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step
MemberSubstitution.Substitution.Chain.Step.Factory, MemberSubstitution.Substitution.Chain.Step.Resolution, MemberSubstitution.Substitution.Chain.Step.Simple
-
-
Field Summary
Fields Modifier and Type Field Description private TypeDescription.GenericresultTypeThe resulting type of applying the stack manipulation.private StackManipulationstackManipulationThe stack manipulation to apply.
-
Constructor Summary
Constructors Constructor Description Simple(StackManipulation stackManipulation, TypeDescription.Generic resultType)Creates a new simple substitution step.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeDescription.GenericgetResultType()Returns the resulting type of the substitution orvoidif no resulting value is applied.StackManipulationgetStackManipulation()Returns the stack manipulation to apply the substitution.MemberSubstitution.Substitution.Chain.Stepmake(Assigner assigner, Assigner.Typing typing, TypeDescription instrumentedType, MethodDescription instrumentedMethod)Creates a substitution step for an instrumented method.MemberSubstitution.Substitution.Chain.Step.Resolutionresolve(TypeDescription targetType, ByteCodeElement target, TypeList.Generic parameters, TypeDescription.Generic current, java.util.Map<java.lang.Integer,java.lang.Integer> offsets, int freeOffset)Resolves this step of a substitution chain.
-
-
-
Field Detail
-
stackManipulation
private final StackManipulation stackManipulation
The stack manipulation to apply.
-
resultType
private final TypeDescription.Generic resultType
The resulting type of applying the stack manipulation.
-
-
Constructor Detail
-
Simple
public Simple(StackManipulation stackManipulation, TypeDescription.Generic resultType)
Creates a new simple substitution step.- Parameters:
stackManipulation- The stack manipulation to apply.resultType- The resulting type of applying the stack manipulation.
-
-
Method Detail
-
make
public MemberSubstitution.Substitution.Chain.Step make(Assigner assigner, Assigner.Typing typing, TypeDescription instrumentedType, MethodDescription instrumentedMethod)
Creates a substitution step for an instrumented method.- Specified by:
makein interfaceMemberSubstitution.Substitution.Chain.Step.Factory- Parameters:
assigner- The assigner to use.typing- The typing to use.instrumentedType- The instrumented type.instrumentedMethod- The instrumented method.- Returns:
- The substitution step to apply.
-
resolve
public MemberSubstitution.Substitution.Chain.Step.Resolution resolve(TypeDescription targetType, ByteCodeElement target, TypeList.Generic parameters, TypeDescription.Generic current, java.util.Map<java.lang.Integer,java.lang.Integer> offsets, int freeOffset)
Resolves this step of a substitution chain.- Specified by:
resolvein interfaceMemberSubstitution.Substitution.Chain.Step- Parameters:
targetType- The target result type of the substitution.target- The byte code element that is currently substituted.parameters- The parameters of the substituted element.current- The current type of the applied substitution that is the top element on the operand stack.offsets- The arguments of the substituted byte code element mapped to their local variable offsets.freeOffset- The first free offset in the local variable array.- Returns:
- A resolved substitution step for the supplied inputs.
-
getStackManipulation
public StackManipulation getStackManipulation()
Returns the stack manipulation to apply the substitution.- Specified by:
getStackManipulationin interfaceMemberSubstitution.Substitution.Chain.Step.Resolution- Returns:
- The stack manipulation to apply the substitution.
-
getResultType
public TypeDescription.Generic getResultType()
Returns the resulting type of the substitution orvoidif no resulting value is applied.- Specified by:
getResultTypein interfaceMemberSubstitution.Substitution.Chain.Step.Resolution- Returns:
- The resulting type of the substitution or
voidif no resulting value is applied.
-
-