Package spoon.reflect.visitor.filter
package spoon.reflect.visitor.filter
This package contains a set of useful filters when querying the model.
-
ClassDescriptionAbstractFilter<T extends CtElement>Defines an abstract filter based on matching on the element types.AbstractReferenceFilter<T extends CtReference>This class defines an abstract reference filter that needs to be subclassed in order to define the matching criteria.Returns all methods/lambdas with same signature in related inheritance hierarchies.Expects
CtTypeas input and produces allCtTypeMembers declared in input class or any super class or super interface.AnnotationFilter<E extends CtElement>This filter matches all the elements annotated with a given annotation type.This Query expects aCtCatchVariableas input and returns allCtCatchVariableReferences, which refers this input.This Query expects aCtCatchVariableas input and returns all CtElements, which are in visibility scope of that catch variable.CompositeFilter<T extends CtElement>This class defines a composite filter, which can compose several filters together by usingFilteringOperator.Returns all children of an element.DirectReferenceFilter<T extends CtReference>A filter forCtReferences that compare equal to the reference provided in the constructor.This query expects aCtEnumValueas input and returns allCtFieldReferences, which refer to this input.This filter matches all theCtExecutableReferencereferencing defined one or moreCtExecutables.This simple filter matches all the accesses to a given field.This Query expects aCtFieldas input and returns allCtFieldReferences, which refers this input.This Query expects aCtFieldas input and returns all CtElements, which are in visibility scope of that field.This enumeration defines the possible composition operators for filters.This simple filter matches all the accesses to a given executable or any executable that overrides it.This filter matches all theCtLambdaelements, which implements defined interface(s)This filter matches all elements that can be considered as line of code (e.g. directly contained in a block, or a then statement).This mapping function expects aCtLocalVariableas input and returns allCtLocalVariableReferences, which refers this input.This Query expects aCtLocalVariableas input and returns all CtElements, which are in visibility scope of that local variable.NamedElementFilter<T extends CtNamedElement>Filters elements by name and by type (for instance to find a method).Gets all overridden method from the method given.Gets all overridden method from the method given.Gets all overriding method from the method given.This Query expects aCtParameteras input and returns allCtParameterReferences, which refers this input.This Query expects aCtParameteras input and returns all CtElements, which are in visibility scope of that parameter.This Function expects aCtElementas input and returns all parents of this element.This mapping function searches for allCtVariableinstances, which might be a declaration of an inputCtElement.ReferenceTypeFilter<T extends CtReference>This simple filter matches all the references of a given type.RegexFilter<E extends CtElement>Filters elements with a regular expression on the element's code.This simple filter matches all the occurrences of a return or a throw statement (end of execution flow).Finds the element given in parameter, useful for checking if an element is in an ancestor.visits siblings of input element.Defines visiting modeExpects aCtTypeInformationas input and produces all sub classes and sub interfaces recursively.
The output is produced in arbitrary order.Matches all CtType elements, which are sub type ofSubtypeFilter.superTypeMatches the input `superType` too.Expects aCtTypeInformationas input and produces all super classes and super interfaces recursively.
The output is produced in following order: input type. if `includingSelf==true` all interfaces of type recursively parent class of type goto 1: using parent class as input typeImplementation ofCtScannerListener, which is used to assure that each interface is visited only once.TypeFilter<T extends CtElement>This simple filter matches all the elements of a given type.VariableAccessFilter<T extends CtVariableAccess<?>>This simple filter matches all the accesses to a given variable.Mapping function for determining allCtVariableReferences that refer to a givenCtVariable.The mapping function, acceptingCtVariableCtLocalVariable - local variable declared in body CtParameter - method parameter CtCatchVariable - try - catch variable and returning all the CtElements, which exists in visibility scope of this variable.