Class PersistentPropertyMatcher<T extends net.bytebuddy.description.method.MethodDescription>

java.lang.Object
net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase<W>
net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues<T>
cz.cvut.kbss.jopa.model.metamodel.gen.PersistentPropertyMatcher<T>
Type Parameters:
T - MethodDescription
All Implemented Interfaces:
net.bytebuddy.matcher.ElementMatcher<T>, net.bytebuddy.matcher.ElementMatcher.Junction<T>
Direct Known Subclasses:
PersistentPropertyGetterMatcher, PersistentPropertySetterMatcher

public abstract class PersistentPropertyMatcher<T extends net.bytebuddy.description.method.MethodDescription> extends net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues<T>
Matches only persistent attribute getters/setters.

This matcher checks that there exists a persistent field corresponding to the method name that appears to be a getter/setter.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher

    net.bytebuddy.matcher.ElementMatcher.Junction<S extends Object>

    Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher.Junction

    net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase<V extends Object>, net.bytebuddy.matcher.ElementMatcher.Junction.Conjunction<W extends Object>, net.bytebuddy.matcher.ElementMatcher.Junction.Disjunction<W extends Object>, net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues<W extends Object>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    doMatch(T target)
     
    boolean
     
    int
     
    protected abstract Optional<String>
    resolveFieldName(String methodName, net.bytebuddy.description.method.MethodDescription methodDesc)
     
    protected Optional<Field>
     

    Methods inherited from class net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues

    matches

    Methods inherited from class net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase

    and, or

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PersistentPropertyMatcher

      public PersistentPropertyMatcher(Class<?> parentType)
  • Method Details

    • doMatch

      protected boolean doMatch(T target)
      Specified by:
      doMatch in class net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues<T extends net.bytebuddy.description.method.MethodDescription>
    • resolveFieldName

      protected abstract Optional<String> resolveFieldName(String methodName, net.bytebuddy.description.method.MethodDescription methodDesc)
    • tryFindingField

      protected Optional<Field> tryFindingField(String fieldName)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues<T extends net.bytebuddy.description.method.MethodDescription>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues<T extends net.bytebuddy.description.method.MethodDescription>