public static enum MemberSubstitution.Substitution.Stubbing extends Enum<MemberSubstitution.Substitution.Stubbing> implements MemberSubstitution.Substitution<MemberSubstitution.Target>, MemberSubstitution.Substitution.Factory<MemberSubstitution.Target>
null or zero for primitive types.MemberSubstitution.Substitution.Chain<S extends MemberSubstitution.Target>, MemberSubstitution.Substitution.Factory<S extends MemberSubstitution.Target>, MemberSubstitution.Substitution.ForFieldAccess, MemberSubstitution.Substitution.ForMethodInvocation, MemberSubstitution.Substitution.ForValue, MemberSubstitution.Substitution.Stubbing| Enum Constant and Description |
|---|
INSTANCE
The singleton instance.
|
| Modifier and Type | Method and Description |
|---|---|
MemberSubstitution.Substitution<MemberSubstitution.Target> |
make(TypeDescription instrumentedType,
MethodDescription instrumentedMethod,
TypePool typePool)
Creates a substitution for an instrumented method.
|
StackManipulation |
resolve(MemberSubstitution.Target target,
TypeList.Generic parameters,
TypeDescription.Generic result,
JavaConstant.MethodHandle methodHandle,
StackManipulation stackManipulation,
int freeOffset)
Resolves this substitution into a stack manipulation.
|
static MemberSubstitution.Substitution.Stubbing |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MemberSubstitution.Substitution.Stubbing[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MemberSubstitution.Substitution.Stubbing INSTANCE
public static MemberSubstitution.Substitution.Stubbing[] values()
for (MemberSubstitution.Substitution.Stubbing c : MemberSubstitution.Substitution.Stubbing.values()) System.out.println(c);
public static MemberSubstitution.Substitution.Stubbing valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic MemberSubstitution.Substitution<MemberSubstitution.Target> make(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypePool typePool)
make in interface MemberSubstitution.Substitution.Factory<MemberSubstitution.Target>instrumentedType - The instrumented type.instrumentedMethod - The instrumented method.typePool - The type pool being used.public StackManipulation resolve(MemberSubstitution.Target target, TypeList.Generic parameters, TypeDescription.Generic result, JavaConstant.MethodHandle methodHandle, StackManipulation stackManipulation, int freeOffset)
resolve in interface MemberSubstitution.Substitution<MemberSubstitution.Target>target - The targeted member 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.