Class VariableAccessFilter<T extends CtVariableAccess<?>>

java.lang.Object
spoon.reflect.visitor.filter.VariableAccessFilter<T>
All Implemented Interfaces:
Filter<T>
Direct Known Subclasses:
FieldAccessFilter

public class VariableAccessFilter<T extends CtVariableAccess<?>> extends Object implements Filter<T>
This simple filter matches all the accesses to a given variable.
  • Constructor Details

    • VariableAccessFilter

      public VariableAccessFilter(CtVariableReference<?> variable)
      Creates a new variable access filter.
      Parameters:
      variable - the variable to find accesses for, must not be null
  • Method Details

    • matches

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