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
CtReference
s 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
-
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:Filter
Tells if the given element matches.- Specified by:
matches
in interfaceFilter<T extends CtReference>
- Overrides:
matches
in classAbstractFilter<T extends CtReference>
- Parameters:
reference
- - the element to be checked for a match. Parameter element is never null ifQuery
is used.
-