|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectspoon.reflect.visitor.CtScanner
spoon.reflect.visitor.Query
public abstract class Query
This class provides some useful methods to retrieve program elements and
reference through a CtScanner-based deep
search. It uses the Filter and
ReferenceFilter facitily to select the right
elements or references.
| Method Summary | ||
|---|---|---|
static
|
getElements(CtElement rootElement,
Filter<E> filter)
Returns all the program elements that match the filter. |
|
static
|
getElements(Factory factory,
Filter<E> filter)
Within a given factory, returns all the program elements that match the filter. |
|
static
|
getReferences(CtElement rootElement,
ReferenceFilter<T> filter)
Returns all the program element references that match the filter. |
|
static
|
getReferences(Factory factory,
ReferenceFilter<R> filter)
Within a given factory, returns all the program element references that match the filter. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <E extends CtElement> java.util.List<E> getElements(Factory factory,
Filter<E> filter)
E - the type of the seeked program elementsfactory - the factory that contains the elements where to recursive
search onfilter - the filter which defines the matching criteria
public static <E extends CtElement> java.util.List<E> getElements(CtElement rootElement,
Filter<E> filter)
E - the type of the seeked program elementsrootElement - the element to start the recursive search onfilter - the filter which defines the matching criteria
public static <T extends CtReference> java.util.List<T> getReferences(CtElement rootElement,
ReferenceFilter<T> filter)
T - the type of the seeked program element referencesrootElement - the element to start the recursive search onfilter - the filter which defines the matching criteria
public static <R extends CtReference> java.util.List<R> getReferences(Factory factory,
ReferenceFilter<R> filter)
R - the type of the seeked program element referencesfactory - the factory that contains the references where to recursive
search onfilter - the filter which defines the matching criteria
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||