public static enum MemberSubstitution.Source extends Enum<MemberSubstitution.Source>
| Modifier and Type | Class and Description | 
|---|---|
| protected static class  | MemberSubstitution.Source.ValueRepresents a value that can be loaded from a given offset. | 
| Enum Constant and Description | 
|---|
| ENCLOSING_METHODIndicates that an element should be loaded in context of the instrumented method. | 
| SUBSTITUTED_ELEMENTIndicates that an element should be loaded in context of the substituted method, constructor or field. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract MemberSubstitution.Source.Value | argument(int index,
        TypeList.Generic parameters,
        Map<Integer,Integer> offsets,
        MemberSubstitution.Target target,
        MethodDescription instrumentedMethod)Resolves a value representation of the parameter of the specified index or  nullif no such parameter is available. | 
| protected abstract List<MemberSubstitution.Source.Value> | arguments(boolean includesSelf,
         TypeList.Generic parameters,
         Map<Integer,Integer> offsets,
         MemberSubstitution.Target target,
         MethodDescription instrumentedMethod)Resolves a list of value representation of all parameters. | 
| protected abstract JavaConstant.MethodHandle | handle(JavaConstant.MethodHandle methodHandle,
      MethodDescription instrumentedMethod)Resolves a method handle. | 
| protected abstract boolean | isRepresentable(MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort sort,
               MemberSubstitution.Target target,
               MethodDescription instrumentedMethod)Validates if the supplied origin sort is representable. | 
| protected abstract StackManipulation | resolve(MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort sort,
       MemberSubstitution.Target target,
       TypeList.Generic parameters,
       TypeDescription.Generic result,
       MethodDescription instrumentedMethod)Resolves a stack manipulation that loads the supplied sort of origin onto the operand stack. | 
| protected abstract MemberSubstitution.Source.Value | self(TypeList.Generic parameters,
    Map<Integer,Integer> offsets,
    MemberSubstitution.Target target,
    MethodDescription instrumentedMethod)Resolves a value representation of the  thisreference ornullif no such reference is available. | 
| static MemberSubstitution.Source | valueOf(String name)Returns the enum constant of this type with the specified name. | 
| static MemberSubstitution.Source[] | values()Returns an array containing the constants of this enum type, in
the order they are declared. | 
public static final MemberSubstitution.Source SUBSTITUTED_ELEMENT
public static final MemberSubstitution.Source ENCLOSING_METHOD
public static MemberSubstitution.Source[] values()
for (MemberSubstitution.Source c : MemberSubstitution.Source.values()) System.out.println(c);
public static MemberSubstitution.Source 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 null@MaybeNull protected abstract MemberSubstitution.Source.Value self(TypeList.Generic parameters, Map<Integer,Integer> offsets, MemberSubstitution.Target target, MethodDescription instrumentedMethod)
this reference or null if no such reference is available.parameters - The list of parameters of the substituted element.offsets - A mapping of offsets of parameter indices to offsets.target - The target member of invokedynamic invocation.instrumentedMethod - The instrumented method.this reference or null if no such reference is available.@MaybeNull protected abstract MemberSubstitution.Source.Value argument(int index, TypeList.Generic parameters, Map<Integer,Integer> offsets, MemberSubstitution.Target target, MethodDescription instrumentedMethod)
null if no such parameter is available.index - The index of the targeted parameter.parameters - The list of parameters of the substituted element.offsets - A mapping of offsets of parameter indices to offsets.target - The target member of invokedynamic invocation.instrumentedMethod - The instrumented method.null if no such parameter is available.protected abstract List<MemberSubstitution.Source.Value> arguments(boolean includesSelf, TypeList.Generic parameters, Map<Integer,Integer> offsets, MemberSubstitution.Target target, MethodDescription instrumentedMethod)
includesSelf - true if the this reference should be included if available.parameters - The list of parameters of the substituted element.offsets - A mapping of offsets of parameter indices to offsets.target - The target member of invokedynamic invocation.instrumentedMethod - The instrumented method.protected abstract JavaConstant.MethodHandle handle(JavaConstant.MethodHandle methodHandle, MethodDescription instrumentedMethod)
methodHandle - A method handle of the substituted element.instrumentedMethod - The instrumented method.protected abstract boolean isRepresentable(MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort sort, MemberSubstitution.Target target, MethodDescription instrumentedMethod)
sort - The sort of origin.target - The target member of invokedynamic invocation.instrumentedMethod - The instrumented method.true if the supplied sort of origin is representable.protected abstract StackManipulation resolve(MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort sort, MemberSubstitution.Target target, TypeList.Generic parameters, TypeDescription.Generic result, MethodDescription instrumentedMethod)
sort - The sort of origin.target - The target member of invokedynamic invocation.parameters - The parameters to the substituted element.result - The type upon which the substituted element is invoked.instrumentedMethod - The instrumented method.Copyright © 2014–2025. All rights reserved.