Class CompositeFilter<T extends CtElement>

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

public class CompositeFilter<T extends CtElement> extends Object implements Filter<T>
This class defines a composite filter, which can compose several filters together by using FilteringOperator.
Author:
Renaud Pawlak
  • Constructor Details

    • CompositeFilter

      public CompositeFilter(FilteringOperator operator, Filter<T>... filters)
      Creates a new composite filter.
      Parameters:
      operator - the operator used to compose the filters together
      filters - the filters to be composed
  • Method Details

    • matches

      public boolean matches(T element)
      Defines the matching using FilteringOperator.
      Specified by:
      matches in interface Filter<T extends CtElement>
      Parameters:
      element - - the element to be checked for a match. Parameter element is never null if Query is used.
    • getType

      public Class<T> getType()