Class MemberSubstitution.WithoutSpecification.ForMatchedField

java.lang.Object
net.bytebuddy.asm.MemberSubstitution.WithoutSpecification<MemberSubstitution.Target.ForMember>
net.bytebuddy.asm.MemberSubstitution.WithoutSpecification.ForMatchedField
Enclosing class:
MemberSubstitution.WithoutSpecification<T extends MemberSubstitution.Target>

@Enhance public static class MemberSubstitution.WithoutSpecification.ForMatchedField extends MemberSubstitution.WithoutSpecification<MemberSubstitution.Target.ForMember>
Describes a member substitution that requires a specification for how to replace a field.
  • Field Details

    • matcher

      private final ElementMatcher<? super FieldDescription> matcher
      A matcher for any field that should be substituted.
    • matchRead

      private final boolean matchRead
      true if read access to a field should be substituted.
    • matchWrite

      private final boolean matchWrite
      true if write access to a field should be substituted.
  • Constructor Details

    • ForMatchedField

      protected ForMatchedField(MethodGraph.Compiler methodGraphCompiler, MemberSubstitution.TypePoolResolver typePoolResolver, boolean strict, boolean failIfNoMatch, MemberSubstitution.Replacement.Factory replacementFactory, ElementMatcher<? super FieldDescription> matcher)
      Creates a new member substitution for a matched field that requires a specification for how to perform a substitution.
      Parameters:
      methodGraphCompiler - The method graph compiler to use.
      typePoolResolver - The type pool resolver to use.
      strict - true if the method processing should be strict where an exception is raised if a member cannot be found.
      failIfNoMatch - true if the instrumentation should fail if applied to a method without match.
      replacementFactory - The replacement factory to use.
      matcher - A matcher for any field that should be substituted.
    • ForMatchedField

      protected ForMatchedField(MethodGraph.Compiler methodGraphCompiler, MemberSubstitution.TypePoolResolver typePoolResolver, boolean strict, boolean failIfNoMatch, MemberSubstitution.Replacement.Factory replacementFactory, ElementMatcher<? super FieldDescription> matcher, boolean matchRead, boolean matchWrite)
      Creates a new member substitution for a matched field that requires a specification for how to perform a substitution.
      Parameters:
      methodGraphCompiler - The method graph compiler to use.
      typePoolResolver - The type pool resolver to use.
      strict - true if the method processing should be strict where an exception is raised if a member cannot be found.
      failIfNoMatch - true if the instrumentation should fail if applied to a method without match.
      replacementFactory - The replacement factory to use.
      matcher - A matcher for any field that should be substituted.
      matchRead - true if read access to a field should be substituted.
      matchWrite - true if write access to a field should be substituted.
  • Method Details