Class DirectReferenceFilter<T extends CtReference>

java.lang.Object
spoon.reflect.visitor.filter.AbstractFilter<T>
spoon.reflect.visitor.filter.DirectReferenceFilter<T>
All Implemented Interfaces:
Filter<T>

public class DirectReferenceFilter<T extends CtReference> extends AbstractFilter<T>
This simple filter matches all the references to a given element by using reference equality.
  • Constructor Details

    • DirectReferenceFilter

      public DirectReferenceFilter(CtReference reference)
      Creates the filter.
      Parameters:
      reference - the matching reference
  • Method Details

    • matches

      public boolean matches(T reference)
      Description copied from interface: Filter
      Tells if the given element matches.
      Specified by:
      matches in interface Filter<T extends CtReference>
      Overrides:
      matches in class AbstractFilter<T extends CtReference>
      Parameters:
      reference - - the element to be checked for a match. Parameter element is never null if Query is used.