Package spoon.reflect.visitor.filter
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>
A filter for
CtReferences that compare equal to the reference provided in the constructor.
Note that this does not cover all references to the pointed-to element.
If the reference to search for refers to a field, for example, type information is part of the
CtVariableReference. This will cause searches for generic fields
to turn up short, as references with a known type are different.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class spoon.reflect.visitor.filter.AbstractFilter
getType
-
Constructor Details
-
DirectReferenceFilter
Creates the filter.- Parameters:
reference- the matching reference
-
-
Method Details
-
matches
Description copied from interface:FilterTells if the given element matches.- Specified by:
matchesin interfaceFilter<T extends CtReference>- Overrides:
matchesin classAbstractFilter<T extends CtReference>- Parameters:
reference- - the element to be checked for a match. Parameter element is never null ifQueryis used.
-