Uses of Interface
spoon.reflect.visitor.Filter
Package
Description
This root package provides the default integrated launchers for Spoon program processing.
This package contains legacy code of Spoon.
This package defines the Spoon's compile-time meta-model of Java programs.
This package contains the meta-model part that models the executable code (methods and constructors' bodies, field initializers).
This package contains the meta-model part that models the declarations (program's structures such as classes, fields, etc).
This package defines visitor, scanner, and scanner-based query API for Java programs reified in the meta-model.
This package contains a set of useful filters when querying the model.
This package defines a framework for well-typed pure-Java templates.
-
Uses of Filter in spoon
Modifier and TypeMethodDescriptionvoid
SpoonModelBuilder.generateProcessedSourceFiles(OutputType outputType, Filter<CtType<?>> typeFilter)
Generates the source code associated to the classes stored in this compiler's factory.void
Launcher.setOutputFilter(Filter<CtType<?>> typeFilter)
void
SpoonAPI.setOutputFilter(Filter<CtType<?>> typeFilter)
Applies a filter when the output-type is defined on classes. -
Uses of Filter in spoon.legacy
Modifier and TypeClassDescriptionclass
NameFilter<T extends CtNamedElement>
Filters elements by name (for instance to find a method). -
Uses of Filter in spoon.pattern
Modifier and TypeMethodDescriptionAll elements matched byFilter
will be substituted by parameter valueAttribute defined by `role` of all elements matched byFilter
will be substituted by parameter valuePatternBuilderHelper.keepTypeMembers(Filter<? super CtElement> filter)
-
Uses of Filter in spoon.reflect
Modifier and TypeMethodDescriptionCtModelImpl.filterChildren(Filter<R> filter)
CtModel.getElements(Filter<E> filter)
Returns all the model elements matching the filter.CtModelImpl.getElements(Filter<E> filter)
-
Uses of Filter in spoon.reflect.code
Modifier and TypeMethodDescription<T extends CtStatementList>
TCtStatementList.insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
Inserts the given statement after a set of insertion points given by a filter.<T extends CtStatementList>
TCtStatementList.insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
Inserts the given statement list after a set of insertion points given by a filter.<T extends CtStatementList>
TCtStatementList.insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
Inserts the given statement before a set of insertion points given by a filter.<T extends CtStatementList>
TCtStatementList.insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
Inserts the given statement list before a set of insertion points given by a filter. -
Uses of Filter in spoon.reflect.declaration
-
Uses of Filter in spoon.reflect.visitor
Modifier and TypeMethodDescriptionQuery.getElements(CtElement rootElement, Filter<E> filter)
Returns all the program elements that match the filter starting from the given rootElement.Query.getElements(Factory factory, Filter<E> filter)
Within a given factory, returns all the program elements that match the filter.static <T extends CtReference>
List<T>Query.getReferences(CtElement rootElement, Filter<T> filter)
Returns all the program element references that match the filter.static <R extends CtReference>
List<R>Query.getReferences(Factory factory, Filter<R> filter)
Within a given factory, returns all the program element references that match the filter. -
Uses of Filter in spoon.reflect.visitor.chain
Modifier and TypeMethodDescriptionCtQuery.filterChildren(Filter<R> filter)
Recursively scans all children elements of an input element.CtQueryable.filterChildren(Filter<R> filter)
<R extends CtElement>
CtQueryImplCtQueryImpl.filterChildren(Filter<R> filter)
The matched element for which (filter.matches(element)==true) is sent to the next query step.<R extends CtElement>
CtQueryImpl -
Uses of Filter in spoon.reflect.visitor.filter
Modifier and TypeClassDescriptionclass
AbstractFilter<T extends CtElement>
Defines an abstract filter based on matching on the element types.class
AbstractReferenceFilter<T extends CtReference>
This class defines an abstract reference filter that needs to be subclassed in order to define the matching criteria.class
AnnotationFilter<E extends CtElement>
This filter matches all the elements annotated with a given annotation type.class
CompositeFilter<T extends CtElement>
This class defines a composite filter, which can compose several filters together by usingFilteringOperator
.class
DirectReferenceFilter<T extends CtReference>
A filter forCtReference
s that compare equal to the reference provided in the constructor.class
This filter matches all theCtExecutableReference
referencing defined one or moreCtExecutable
s.class
This simple filter matches all the accesses to a given field.class
This simple filter matches all the accesses to a given executable or any executable that overrides it.class
This filter matches all theCtLambda
elements, which implements defined interface(s)class
This filter matches all elements that can be considered as line of code (e.g.class
NamedElementFilter<T extends CtNamedElement>
Filters elements by name and by type (for instance to find a method).class
Gets all overridden method from the method given.class
Gets all overriding method from the method given.class
ReferenceTypeFilter<T extends CtReference>
This simple filter matches all the references of a given type.class
RegexFilter<E extends CtElement>
Filters elements with a regular expression on the element's code.class
This simple filter matches all the occurrences of a return or a throw statement (end of execution flow).class
Finds the element given in parameter, useful for checking if an element is in an ancestor.class
Matches all CtType elements, which are sub type ofSubtypeFilter.superType
Matches the input `superType` too.class
TypeFilter<T extends CtElement>
This simple filter matches all the elements of a given type.class
VariableAccessFilter<T extends CtVariableAccess<?>>
This simple filter matches all the accesses to a given variable.ModifierConstructorDescriptionCompositeFilter(FilteringOperator operator, Filter<T>... filters)
Creates a new composite filter. -
Uses of Filter in spoon.support.compiler.jdt
Modifier and TypeMethodDescriptionvoid
JDTBasedSpoonCompiler.generateProcessedSourceFiles(OutputType outputType, Filter<CtType<?>> typeFilter)
protected void
JDTBasedSpoonCompiler.generateProcessedSourceFilesUsingTypes(Filter<CtType<?>> typeFilter)
-
Uses of Filter in spoon.support.reflect.code
Modifier and TypeMethodDescription<T extends CtStatementList>
TCtBlockImpl.insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<T extends CtStatementList>
TCtBlockImpl.insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
<T extends CtStatementList>
TCtCaseImpl.insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<T extends CtStatementList>
TCtCaseImpl.insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
<T extends CtStatementList>
TCtStatementListImpl.insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<T extends CtStatementList>
TCtStatementListImpl.insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
<T extends CtStatementList>
TCtBlockImpl.insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<T extends CtStatementList>
TCtBlockImpl.insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
<T extends CtStatementList>
TCtCaseImpl.insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<T extends CtStatementList>
TCtCaseImpl.insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
<T extends CtStatementList>
TCtStatementListImpl.insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
<T extends CtStatementList>
TCtStatementListImpl.insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
-
Uses of Filter in spoon.support.reflect.declaration
-
Uses of Filter in spoon.template
Modifier and TypeClassDescriptionclass
This class defines an engine for matching a template to pieces of code.