@HashCodeAndEqualsPlugin.Enhance public static class MemberSubstitution.Substitution.Chain extends Object implements MemberSubstitution.Substitution
Modifier and Type | Class and Description |
---|---|
static class |
MemberSubstitution.Substitution.Chain.Factory
A factory for creating a substitution chain.
|
static interface |
MemberSubstitution.Substitution.Chain.Step
Represents a step of a substitution chain.
|
MemberSubstitution.Substitution.Chain, MemberSubstitution.Substitution.ForFieldAccess, MemberSubstitution.Substitution.ForMethodInvocation, MemberSubstitution.Substitution.ForValue, MemberSubstitution.Substitution.Stubbing
Modifier | Constructor and Description |
---|---|
protected |
Chain(Assigner assigner,
Assigner.Typing typing,
List<MemberSubstitution.Substitution.Chain.Step> steps)
Creates a new substitution chain.
|
Modifier and Type | Method and Description |
---|---|
StackManipulation |
resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
JavaConstant.MethodHandle methodHandle,
StackManipulation stackManipulation,
int freeOffset)
Resolves this substitution into a stack manipulation.
|
static MemberSubstitution.Substitution.Chain.Factory |
with(Assigner assigner,
Assigner.Typing typing)
Creates a new substitution chain.
|
static MemberSubstitution.Substitution.Chain.Factory |
withDefaultAssigner()
Creates a new substitution chain that uses a default assigner and static typing.
|
protected Chain(Assigner assigner, Assigner.Typing typing, List<MemberSubstitution.Substitution.Chain.Step> steps)
assigner
- The assigner to use.typing
- The typing of the assignment to use.steps
- The substitution steps to apply.public static MemberSubstitution.Substitution.Chain.Factory withDefaultAssigner()
public static MemberSubstitution.Substitution.Chain.Factory with(Assigner assigner, Assigner.Typing typing)
assigner
- The assigner to use.typing
- The typing of the assignment to use.public StackManipulation resolve(TypeDescription receiver, ByteCodeElement.Member original, TypeList.Generic parameters, TypeDescription.Generic result, JavaConstant.MethodHandle methodHandle, StackManipulation stackManipulation, int freeOffset)
resolve
in interface MemberSubstitution.Substitution
receiver
- The target type on which a member is accessed.original
- The field, method or constructor that is substituted.parameters
- All parameters that serve as input to this access.result
- The result that is expected from the interaction or void
if no result is expected.methodHandle
- A method handle describing the substituted expression.stackManipulation
- The original byte code expression that is being executed.freeOffset
- The first free offset of the local variable array that can be used for storing values.Copyright © 2014–2025. All rights reserved.