Uses of Interface
spoon.reflect.declaration.CtElement
Package
Description
This root package provides the default integrated launchers for Spoon program processing.
This package defines interfaces for Java file compilation with Spoon.
this is unstable code, subject to potential complete redesign, not only in snapshots but also in releases.
Ready to go meta?
This package contains classes that model the Spoon metamodel itself.
This package contains the core API for code processing.
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 defines compilation units that hold the source code and some classes around them (in most cases, these features should be ignored by the programmers).
This package contains the meta-model part that models the declarations (program's structures such as classes, fields, etc).
This package defines some evaluators for the Spoon meta-model.
This package defines all the sub-factories for the Spoon meta-model.
This package defines the references to program elements for the meta-model.
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 contains some default implementations for commonly used processing tasks.
This package provides an implementation of the spoon.reflect package.
This package provides support for the sniper mode: only the transformed part of classes is rewritten to disk.
This package defines a framework for well-typed pure-Java templates.
-
Uses of CtElement in spoon
Modifier and TypeMethodDescription<T extends CtElement>
voidLauncher.addProcessor(Processor<T> processor)
<T extends CtElement>
voidSpoonAPI.addProcessor(Processor<T> processor)
Adds an instance of a processor.<T extends CtElement>
FluentLauncherAdds an instance of a processor.<T extends CtElement>
FluentLauncherAdds an instance of a processor.Modifier and TypeMethodDescriptionLauncher.getProcessors()
Gets the list of processors instance to be initially applied during the processing.Modifier and TypeMethodDescriptionvoid
ContractVerifier.checkParentConsistency(CtElement element)
public modifier for testing purpose only, not in the public APIModifier and TypeMethodDescriptionvoid
SpoonModelBuilder.process(Collection<Processor<? extends CtElement>> processors)
Processes the Java model with the given processors. -
Uses of CtElement in spoon.compiler
Modifier and TypeMethodDescriptionFileGenerator<? extends CtElement>
Environment.getDefaultFileGenerator()
Returns the default file generator for this environment (gives the default output directory for the created files).Modifier and TypeMethodDescriptionvoid
Helper method called by a processor to report an error, warning or message as dictated by the severity parameter.Modifier and TypeMethodDescriptionvoid
Environment.setDefaultFileGenerator(FileGenerator<? extends CtElement> generator)
Sets the default file generator for this environment. -
Uses of CtElement in spoon.experimental
-
Uses of CtElement in spoon.metamodel
Modifier and TypeMethodDescriptionMetamodel.getConcept(Class<? extends CtElement> clazz)
static String
Metamodel.getConceptName(Class<? extends CtElement> conceptClass)
-
Uses of CtElement in spoon.pattern
Modifier and TypeMethodDescriptionMain method to generate a new AST made from substituting of parameters by the values in `params`Generator.generate(ImmutableMap params)
Utility method that provides the same feature asGenerator.generate(Map)
, but with aImmutableMap
as parameter (a Spoon elegant utility type)Modifier and TypeMethodDescriptionMatch.getMatchingElements()
PatternBuilderHelper.getPatternElements()
Modifier and TypeMethodDescriptionElements will be substituted by parameter valueAttribute defined by `role` of `element` will be substituted by parameter valuePatternParameterConfigurator.ParameterElementPair.copyAndSet(CtElement element)
static PatternBuilder
Pattern.getMatches(CtElement root)
Finds all target program sub-trees that correspond to this pattern and returns them.Modifier and TypeMethodDescriptionstatic PatternBuilder
Creates aPatternBuilder
from the List of template elementsPatternBuilderHelper.keepTypeMembers(Filter<? super CtElement> filter)
-
Uses of CtElement in spoon.pattern.internal
Modifier and TypeMethodDescriptionvoid
DefaultGenerator.applyGeneratedBy(CtElement generatedElement, String genBy)
Adds a Generated by comment to the javadoc of generatedElementDefaultGenerator.getGeneratedByComment(CtElement ele)
-
Uses of CtElement in spoon.pattern.internal.matcher
-
Uses of CtElement in spoon.pattern.internal.node
Modifier and TypeMethodDescriptionstatic ElementNode
Creates an implicitElementNode
, which contains all non derived attributes of `element` and all it's childrenprotected void
ElementNode.generateSingleNodeAttributes(DefaultGenerator generator, CtElement clone, ImmutableMap parameters)
protected ImmutableMap
ElementNode.matchesRole(ImmutableMap parameters, CtElement target, MetamodelProperty mmField, RootNode attrNode)
Modifier and TypeMethodDescriptionstatic ListOfNodes
Same likeElementNode.create(CtElement, Map)
but withList
of elements or primitive objectsstatic ListOfNodes
Same likeElementNode.create(CtElement, Map)
but withSet
of elements or primitive objectsstatic ElementNode
Creates an implicitElementNode
, which contains all non derived attributes of `element` and all it's childrenElementNode.getOrCreateNodeOfRole(CtRole role, Map<CtElement,RootNode> patternElementToSubstRequests)
ModifierConstructorDescriptionElementNode(MetamodelConcept elementType, CtElement templateElement)
-
Uses of CtElement in spoon.processing
Modifier and TypeClassDescriptionclass
AbstractAnnotationProcessor<A extends Annotation,E extends CtElement>
This class defines an abstract annotation processor to be subclassed by the user for defining new annotation processors including Java 8 annotations.class
AbstractParallelProcessor<E extends CtElement>
AbstractParallelProcessor allows using multiple threads for concurrent processing withAbstractProcessor
.class
AbstractProcessor<E extends CtElement>
This class defines an abstract processor to be subclassed by the user for defining new processors.interface
AnnotationProcessor<A extends Annotation,E extends CtElement>
This interface defines an annotation processor.interface
FileGenerator<T extends CtElement>
This interface should be implemented by processing tasks that generate new files as processing results.interface
This interface defines a generic code processor.Modifier and TypeMethodDescriptionAbstractManualProcessor.getProcessedElementTypes()
Invalid method in this context.AbstractProcessor.getProcessedElementTypes()
Processor.getProcessedElementTypes()
Gets all the element types than need to be processed.Modifier and TypeMethodDescriptionboolean
AbstractManualProcessor.isToBeProcessed(CtElement candidate)
Always returns false in this context.void
Does nothing in this context.void
Recursively processes aCtElement
with this manager.Modifier and TypeMethodDescriptionprotected void
AbstractManualProcessor.addProcessedElementType(Class<? extends CtElement> elementType)
Invalid method in this context.protected void
AbstractProcessor.addProcessedElementType(Class<? extends CtElement> elementType)
Adds a processed element type.void
ProcessingManager.process(Collection<? extends CtElement> elements)
Recursively processes a collection ofCtElement
s with this manager.protected void
AbstractProcessor.removeProcessedElementType(Class<? extends CtElement> elementType)
Removes a processed element type. -
Uses of CtElement 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 CtElement in spoon.reflect.code
Modifier and TypeInterfaceDescriptioninterface
This code element defines an abstract invocation on aCtExecutable
.interface
This code element defines an abstract switch (either switch statement or switch expression).interface
This code element defines an access to a annotation parameter variable.interface
CtArrayAccess<T,E extends CtExpression<?>>
This code element defines a one-dimensional array access.interface
CtArrayRead<T>
This code element defines a read access to an array.interface
CtArrayWrite<T>
This code element defines a write access to an array.interface
CtAssert<T>
This code element defines an assert clause.interface
CtAssignment<T,A extends T>
This code element defines an assignment.interface
This interface defines a binary operator.interface
CtBlock<R>
This code element represents a block of code, that is to say a list of statements enclosed in curly brackets.interface
This abstract code element defines an element, which contains a bodyinterface
This code element defines a break statement.interface
CtCase<S>
This code element defines a case within a switch-case.interface
This code element defines acatch
of atry
.interface
This code element defines an exception variable in a catch.interface
This abstract code element represents all the statements that break the control flow of the program.interface
This interface is the root interface of the code elements.interface
This element is a code snippet that must represent an expression and can thus be inserted in the program's model as is.interface
This element is a code snippet that must represent a statement and can thus be inserted in the program's model as is.interface
This code element defines a comment Example:int x = 0; // a comment
interface
This code element defines conditional expressions using the ? (ternary expressions).interface
This code element represents a constructor call.interface
This code element defines the continue statement.interface
This code element defines ado
loop.interface
CtExecutableReferenceExpression<T,E extends CtExpression<?>>
This abstract code element defines an expression which represents an executable reference.interface
CtExpression<T>
This abstract code element defines a typed expression.interface
This code element defines an access to a field variable (read and write)interface
CtFieldRead<T>
This code element defines a read access to a field.interface
CtFieldWrite<T>
This code element defines a write access to a field.interface
This code element defines a for loop.interface
This code element defines a foreach statement.interface
This code element represents anif
statement.interface
CtInvocation<T>
This code element defines a concrete invocation.interface
This code element defines a javadoc comment Example:interface
This code element defines a javadoc tag Example:interface
This abstract code element represents all the statements that break the control flow of the program and which can support a label.interface
CtLambda<T>
This code element represents the creation of a lambda.interface
CtLiteral<T>
This code element defines a literal value (an int, a string, etc).interface
This code element defines a local variable definition (within an executable body).interface
This abstract code element defines a loop.interface
CtNewArray<T>
This code element defines the inline creation of a new array.interface
CtNewClass<T>
This code element represents the creation of a anonymous class.interface
CtOperatorAssignment<T,A extends T>
This code element defines an self-operated assignment such as += or *=.interface
This interface represents a common super type for different patterns implemented in the Java language.interface
CtResource<T>
This code element defines a resource used in the try-with-resource statement.interface
CtReturn<R>
This code element represents areturn
statement.interface
This abstract code element represents all the statements, which can be part of a block.interface
This code element represents a list of statements.interface
This code element defines an access to super.interface
CtSwitch<S>
This code element defines a switch statement.interface
CtSwitchExpression<T,S>
This code element defines a switch expression.interface
This code element defines asynchronized
statement.interface
CtTargetedExpression<T,E extends CtExpression<?>>
This abstract code element defines an expression which contains a target expression.interface
This code element defines a Text Block String Literal.interface
CtThisAccess<T>
This code element defines an access to this.interface
This code element defines athrow
statement.interface
This code element defines atry
statement.interface
This code element defines atry
with resource statement.interface
CtTypeAccess<A>
This code element represents a type reference usable as an expression.interface
This code element defines a type pattern, introduced in Java 16 by JEP 394.interface
This code element represents a unary operator.interface
This code element defines an access to a variable (read and write).interface
This code element defines an read access to a variable.interface
This code element defines a write to a variable.interface
This code element defines awhile
loop.interface
This code element defines ayield
statement.Modifier and TypeMethodDescription<E extends CtElement>
ECtTypeAccess.setImplicit(boolean implicit)
CallsCtTypeAccess.getAccessedType()
.setImplicit() -
Uses of CtElement in spoon.reflect.cu
-
Uses of CtElement in spoon.reflect.cu.position
-
Uses of CtElement in spoon.reflect.declaration
Modifier and TypeInterfaceDescriptioninterface
CtAnnotation<A extends Annotation>
This element represents an annotation on an element.interface
This element defines an annotation method declared in an annotation type.interface
CtAnnotationType<T extends Annotation>
This element defines an annotation type.interface
This element defines an anonymous executable block declaration in a class.interface
CtClass<T>
This element represents a class declaration.interface
Defines a compilation unit.interface
This element defines a constructor declaration.interface
This element represents an enumeration declaration.interface
CtEnumValue<T>
Corresponds to one enum value specified in an enumeration.interface
CtExecutable<R>
This element represents an executable element such as a method, a constructor, or an anonymous block.interface
CtField<T>
This element defines a field declaration.interface
This abstract element defines a declaration that accepts formal type parameters (aka generics), such as a CtType (class A<E>
), CtMethod or CtConstructor.interface
This element represents an import declaration.interface
CtInterface<T>
This element defines an interface declaration.interface
CtMethod<T>
This element defines a method declaration.interface
This interface defines an element that accepts modifiers.interface
Represents a Java module as defined in Java 9.interface
Represents a directive of aCtModule
The directives of a module declaration specify the module's dependences on other modulesCtModuleRequirement
, the packages it makes available to other modulesCtPackageExport
, the services it consumesCtUsedService
, and the services it providesCtProvidedService
.interface
Represents a require module in a Java module definition The requires directive specifies the name of a module on which the current module has a dependence.interface
Defined an element with several types.interface
Declares an element that has a name (a class, a method, a variable, etc).interface
This element defines a package declaration.interface
This element represents an package declaration.interface
Represents an exported or opened package in a Java module The exports directive specifies the name of a package to be exported by the current module.interface
CtParameter<T>
This element defines an executable parameter declaration.interface
Represents a provided service in aCtModule
.interface
This element represents a record declaration.interface
This element represents a record component.interface
CtType<T>
This abstract element defines a super-type for classes and interfaces, which can declare methods.interface
This abstract element defines a typed element.interface
This interface represents a member of a class (field, method, nested class or static/instance initializer).interface
This element defines a declaration of a type parameter (aka generics).interface
Represents the declaration of a used service in aCtModule
The uses directive specifies a service for which the current module may discover providers via java.util.ServiceLoader.interface
CtVariable<T>
This abstract element defines a variable declaration.Modifier and TypeMethodDescription<E extends CtElement>
ECtElement.addAnnotation(CtAnnotation<? extends Annotation> annotation)
Add an annotation for this element<E extends CtElement>
ECtElement.addComment(CtComment comment)
Add a comment to the current elementelement.addComment(element.getFactory().Code().createComment("comment", CtComment.CommentType.INLINE)
CtElement.getAnnotatedChildren(Class<? extends Annotation> annotationType)
Gets the child elements annotated with the given annotation type's instances.CtElement.getElements(Filter<E> filter)
Returns all the children elements recursively matching the filter.<P extends CtElement>
PGets the first parent that matches the given type.<E extends CtElement>
EGets the first parent that matches the filter.<E extends CtElement>
ECtElement.putMetadata(String key, Object val)
Saves metadata inside an Element.<E extends CtElement>
ECtElement.removeComment(CtComment comment)
Remove a comment<E extends CtElement>
voidCtElement.replace(Collection<E> elements)
Replaces this element by several elements.<E extends CtElement>
ECtElement.setAllMetadata(Map<String,Object> metadata)
Saves a bunch of metadata inside an Element<E extends CtElement>
ECtElement.setAnnotations(List<CtAnnotation<? extends Annotation>> annotation)
Sets the annotations for this element.<E extends CtElement>
ECtElement.setComments(List<CtComment> comments)
Set the comment list<E extends CtElement>
ECtElement.setDocComment(String docComment)
Sets the text of the documentation ("javadoc") comment of this declaration.<E extends CtElement>
ECtElement.setImplicit(boolean b)
Sets this element to be implicit.<E extends CtElement>
E<E extends CtElement>
EManually sets the parent element of the current element.<E extends CtElement>
ECtCompilationUnit.setPosition(SourcePosition position)
<E extends CtElement>
ECtElement.setPosition(SourcePosition position)
Sets the position in the Java source file.<E extends CtElement>
ECtElement.setPositions(SourcePosition position)
Sets the position of this element and all its children element.<E extends CtElement, T>
ECtElement.setValueByRole(CtRole role, T value)
Sets a field according to a role.Modifier and TypeMethodDescriptionCtElement.clone()
Clone the element which calls this method in a new object.CtAnnotation.getAnnotatedElement()
Returns the element which is annotated by this annotation.CtCompilationUnit.getParent()
CtElement.getParent()
Gets the parent of current reference.Modifier and TypeMethodDescriptionCtElement.asIterable()
Returns an Iterable instance of this CtElement, allowing for dfs traversal of its descendants.CtElement.descendantIterator()
Returns an iterator over this CtElement's descendants.CtElement.getDirectChildren()
Modifier and TypeMethodDescriptionstatic CtAnnotatedElementType
CtAnnotation.getAnnotatedElementTypeForCtElement(CtElement element)
boolean
Tells if the given element is a direct or indirect parent.void
Replaces this element by another one.<E extends CtElement>
E<E extends CtElement>
EManually sets the parent element of the current element. -
Uses of CtElement in spoon.reflect.eval
-
Uses of CtElement in spoon.reflect.factory
Modifier and TypeMethodDescription<T extends CtElement>
TCoreFactory.clone(T element)
Recursively clones a given element of the metamodel and all its child elements.Modifier and TypeMethodDescriptionCreates an instance of the concrete metamodel class given as parameter.Factory.createElement(Class<? extends CtElement> klass)
FactoryImpl.createElement(Class<? extends CtElement> klass)
ModuleFactory.CtUnnamedModule.getParent()
Modifier and TypeMethodDescription<A extends Annotation>
CtAnnotation<A>Adds an annotation to an element.<A extends Annotation>
CtAnnotation<A>AnnotationFactory.annotate(CtElement element, Class<A> annotationType, String annotationElementName, Object value)
Creates/updates an element's annotation value.<A extends Annotation>
CtAnnotation<A>AnnotationFactory.annotate(CtElement element, CtTypeReference<A> annotationType)
Adds an annotation to an element.<A extends Annotation>
CtAnnotation<A>AnnotationFactory.annotate(CtElement element, CtTypeReference<A> annotationType, String annotationElementName, Object value)
Creates/updates an element's annotation value.Modifier and TypeMethodDescriptionCreates an instance of the concrete metamodel class given as parameter.Factory.createElement(Class<? extends CtElement> klass)
FactoryImpl.createElement(Class<? extends CtElement> klass)
-
Uses of CtElement in spoon.reflect.meta.impl
Modifier and TypeMethodDescriptionstatic RoleHandler
RoleHandlerHelper.getRoleHandlerWrtParent(CtElement element)
Modifier and TypeMethodDescriptionstatic RoleHandler
RoleHandlerHelper.getOptionalRoleHandler(Class<? extends CtElement> targetClass, CtRole role)
static RoleHandler
RoleHandlerHelper.getRoleHandler(Class<? extends CtElement> targetClass, CtRole role)
static List<RoleHandler>
RoleHandlerHelper.getRoleHandlers(Class<? extends CtElement> targetClass)
-
Uses of CtElement in spoon.reflect.path
Modifier and TypeMethodDescriptionCtPath.evaluateOn(CtElement... startNode)
Search for elements matching this CtPatch from start nodes given as parameters.<T extends CtElement>
CtPathBuilderMatch on element of a given type.Modifier and TypeMethodDescriptionCtPath.evaluateOn(CtElement... startNode)
Search for elements matching this CtPatch from start nodes given as parameters.CtElementPathBuilder.fromElement(CtElement el)
Build absolute path to a CtElement el.CtElementPathBuilder.fromElement(CtElement el, CtElement root)
Build path to a CtElement el, from one of its parent.CtRole.getMatchingSubRoleFor(CtElement item)
CtPath.relativePath(CtElement parent)
Returns the path that is relative to the given element (subpath from it to the end of the path). -
Uses of CtElement in spoon.reflect.path.impl
Modifier and TypeClassDescriptionclass
AbstractPathElement<P extends CtElement,T extends CtElement>
Partial implementation for CtPathElementclass
AbstractPathElement<P extends CtElement,T extends CtElement>
Partial implementation for CtPathElementinterface
CtPathElement<P extends CtElement,T extends CtElement>
A single path element from a CtPath.interface
CtPathElement<P extends CtElement,T extends CtElement>
A single path element from a CtPath.class
CtTypedNameElement<P extends CtElement,T extends CtElement>
spoon.reflect.path.impl.CtPathElement that match on CtNamedElementclass
CtTypedNameElement<P extends CtElement,T extends CtElement>
spoon.reflect.path.impl.CtPathElement that match on CtNamedElementModifier and TypeMethodDescriptionCtNamedPathElement.getElements(Collection<CtElement> roots)
CtRolePathElement.getElements(Collection<CtElement> roots)
CtNamedPathElement.scanElements(Collection<? extends CtElement> roots)
Modifier and TypeMethodDescriptionCtPathImpl.evaluateOn(CtElement... startNode)
CtPathImpl.relativePath(CtElement parent)
Modifier and TypeMethodDescriptionCtNamedPathElement.getElements(Collection<CtElement> roots)
CtRolePathElement.getElements(Collection<CtElement> roots)
CtNamedPathElement.scanElements(Collection<? extends CtElement> roots)
-
Uses of CtElement in spoon.reflect.reference
Modifier and TypeInterfaceDescriptioninterface
This interface defines a reference to an array.interface
This interface defines a reference toCtCatchVariable
.interface
This interface defines a reference to aCtExecutable
.interface
This interface defines a reference to aCtField
.interface
This interface defines a reference to an intersection type in generics or in casts.interface
This interface defines a reference toCtLocalVariable
.interface
Represents a reference to aCtModule
interface
This interface defines a reference to aCtPackage
.interface
This interface defines a reference to aCtParameter
of a method.interface
This is the root interface for named program element references, such as fields, types, variables, and so on.interface
This interface defines a import reference to all static type members of a type.
Example:somePackage.Type.*;
interface
This interface defines a reference to a type parameter (aka generics).interface
This interface defines a reference to aCtType
or sub-type.interface
This interface defines a reference to an unboundCtVariable
.interface
This interface defines a reference to aCtVariable
or sub-type.interface
Represents a wildcard in generic type annotations, i.e.Modifier and TypeMethodDescription<E extends CtElement>
ECtTypeMemberWildcardImportReference.addAnnotation(CtAnnotation<? extends Annotation> annotation)
<E extends CtElement>
ECtTypeMemberWildcardImportReference.setAnnotations(List<CtAnnotation<? extends Annotation>> annotation)
<E extends CtElement>
ECtUnboundVariableReference.setAnnotations(List<CtAnnotation<? extends Annotation>> annotation)
<E extends CtElement>
ECtReference.setComments(List<CtComment> comments)
comments are not possible for references<E extends CtElement>
ECtTypeMemberWildcardImportReference.setImplicit(boolean b)
Modifier and TypeMethodDescriptionCtReference.getDeclaration()
Returns the declaration that corresponds to the referenced element only if the declaration is in the analyzed source files. -
Uses of CtElement in spoon.reflect.visitor
Modifier and TypeInterfaceDescriptioninterface
This interface defines a filter for program elements.Modifier and TypeFieldDescriptionCtDequeScanner.elementsDeque
The stack of elements.DefaultJavaPrettyPrinter.preprocessors
Handle imports of classes.CtBiScannerDefault.stack
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.Modifier and TypeMethodDescriptionLexicalScope.getScopeElement()
CtBFSIterator.next()
Dereference the "iterator"CtIterator.next()
Dereference the "iterator"Modifier and TypeMethodDescriptionPrinterHelper.adjustEndPosition(CtElement e)
writes as many newlines as needed for the current line to match the end line of the passed elementPrinterHelper.adjustStartPosition(CtElement e)
writes as many newlines as needed to align the line number again between the element position and the current line numbervoid
DefaultJavaPrettyPrinter.applyPreProcessors(CtElement el)
Warning, this may change the state of the objectabstract void
This method is called to compare `element` and `other` when traversing two trees in parallel.abstract void
This method is called to compare `element` and `other` according to the role when traversing two trees in parallel.void
void
void
ImportScanner.computeImports(CtElement element)
Computes import of aCtElement
void
ImportScannerImpl.computeImports(CtElement element)
protected void
EarlyTerminatingScanner.doScan(CtRole role, CtElement element, ScanningMode mode)
This method is called ONLY when the listener decides that the current element and children should be visited.protected void
protected void
Pushes the element.protected void
This method is called by the scanner when entering a scanned element.protected void
This method is called byDefaultJavaPrettyPrinter.scan(CtElement)
when entering a scanned element.protected void
protected void
void
Enters an element.protected void
protected void
Pops the element.protected void
This method is called by the scanner when exiting a scanned element.protected void
This method is called byDefaultJavaPrettyPrinter.scan(CtElement)
when entering a scanned element.protected void
protected void
protected void
Exits an element.ElementPrinterHelper.getComments(CtElement element, CommentOffset offset)
Query.getElements(CtElement rootElement, Filter<E> filter)
Returns all the program elements that match the filter starting from the given rootElement.static <T extends CtReference>
List<T>Query.getReferences(CtElement rootElement, Filter<T> filter)
Returns all the program element references that match the filter.ImportScannerImpl.lookForLocalVariables(CtElement parent)
void
PrinterHelper.mapLine(CtElement e, CtCompilationUnit unitExpected)
protected void
Called for each scanned element.DefaultJavaPrettyPrinter.prettyprint(CtElement e)
PrettyPrinter.prettyprint(CtElement ctElement)
pretty-prints the element, call#toString()
to get the resultDefaultJavaPrettyPrinter.printElement(CtElement element)
Prints an element.PrettyPrinter.printElement(CtElement element)
Prints an element.void
void
prevent scanner from going down the tree, instead save with other CtElement children of the current nodevoid
Generically scans a meta-model element.void
prevent scanner from going down the tree, instead save with other CtElement children of the current nodevoid
Generically scans a meta-model element.void
Generically scans a meta-model element.The generic scan method for an element.void
void
void
void
CtInheritanceScanner.scanCtElement(CtElement e)
Scans an abstract element.void
ElementPrinterHelper.writeAnnotations(CtElement element)
Writes the annotations for the given element.void
ElementPrinterHelper.writeComment(CtElement element)
void
ElementPrinterHelper.writeComment(CtElement element, CommentOffset offset)
Modifier and TypeMethodDescriptionprotected void
CtBiScannerDefault.biScan(CtRole role, Collection<? extends CtElement> elements, Collection<? extends CtElement> others)
void
CtInheritanceScanner.scan(Collection<? extends CtElement> elements)
Generically scans a collection of meta-model elements.void
CtScanner.scan(Collection<? extends CtElement> elements)
Generically scans a collection of meta-model elements.void
CtScanner.scan(CtRole role, Collection<? extends CtElement> elements)
Generically scans a collection of meta-model elements.void
Generically scans a Map of meta-model elements.void
EarlyTerminatingScanner.scan(CtRole role, Collection<? extends CtElement> elements)
void
void
DefaultJavaPrettyPrinter.setPreprocessors(List<Processor<CtElement>> preprocessors)
Set preprocessors that the printer automatically runs on the model before printing it.ModifierConstructorDescriptionAccessibleVariablesFinder(CtElement expression)
CtBFSIterator(CtElement root)
CtIterator constructor, prepares the iterator from the @root nodeCtIterator(CtElement root)
CtIterator constructor, prepares the iterator from the @root node -
Uses of CtElement 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>
CtQueryImplModifier and TypeMethodDescriptiondefault ScanningMode
Called before the scanner enters an elementdefault ScanningMode
Called before the scanner enters an elementdefault void
This method is called after the element and all its children have been visited.default void
This method is called after the element and all its children have been visited. -
Uses of CtElement in spoon.reflect.visitor.filter
Modifier and TypeClassDescriptionclass
AbstractFilter<T extends CtElement>
Defines an abstract filter based on matching on the element types.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
RegexFilter<E extends CtElement>
Filters elements with a regular expression on the element's code.class
TypeFilter<T extends CtElement>
This simple filter matches all the elements of a given type.Modifier and TypeMethodDescriptionvoid
CtScannerFunction.apply(CtElement input, CtConsumer<Object> outputConsumer)
void
FieldReferenceFunction.apply(CtElement fieldOrScope, CtConsumer<Object> outputConsumer)
void
LocalVariableReferenceFunction.apply(CtElement scope, CtConsumer<Object> outputConsumer)
void
ParentFunction.apply(CtElement input, CtConsumer<Object> outputConsumer)
void
PotentialVariableDeclarationFunction.apply(CtElement input, CtConsumer<Object> outputConsumer)
void
SiblingsFunction.apply(CtElement input, CtConsumer<Object> outputConsumer)
void
VariableReferenceFunction.apply(CtElement variableOrScope, CtConsumer<Object> outputConsumer)
protected void
protected void
void
boolean
-
Uses of CtElement in spoon.support
Modifier and TypeMethodDescriptionModifier and TypeMethodDescriptionFileGenerator<? extends CtElement>
StandardEnvironment.getDefaultFileGenerator()
Modifier and TypeMethodDescriptionvoid
void
void
Recursively processes an element and its children with a given processor.void
Modifier and TypeMethodDescriptionvoid
QueueProcessingManager.process(Collection<? extends CtElement> elements)
void
RuntimeProcessingManager.process(Collection<? extends CtElement> elements)
void
RuntimeProcessingManager.process(Collection<? extends CtElement> elements, Processor<?> processor)
Recursively processes elements and their children with a given processor.void
StandardEnvironment.setDefaultFileGenerator(FileGenerator<? extends CtElement> defaultFileGenerator)
-
Uses of CtElement in spoon.support.comparator
Modifier and TypeMethodDescriptionint
Returns 0 if o1 has the same position as o2, or both positions are invalid and o1.equals(o2).int
int
int
-
Uses of CtElement in spoon.support.compiler.jdt
Modifier and TypeMethodDescriptionvoid
JDTBasedSpoonCompiler.process(Collection<Processor<? extends CtElement>> processors)
-
Uses of CtElement in spoon.support.gui
Modifier and TypeMethodDescriptionvoid
void
void
-
Uses of CtElement in spoon.support.modelobs
Modifier and TypeMethodDescriptionChangeCollector.getChanges(CtElement currentElement)
Return the set ofCtRole
s for which children have changed from `currentElement` since thisChangeCollector
was attached Warning: change in IMPLICIT are ignoredChangeCollector.getDirectChanges(CtElement currentElement)
protected void
Called whenever anything changes in the spoon modelprotected void
void
ActionBasedChangeListenerImpl.onListAdd(CtElement currentElement, CtRole role, List field, int index, CtElement newValue)
void
ActionBasedChangeListenerImpl.onListAdd(CtElement currentElement, CtRole role, List field, CtElement newValue)
void
EmptyModelChangeListener.onListAdd(CtElement currentElement, CtRole role, List field, int index, CtElement newValue)
void
EmptyModelChangeListener.onListAdd(CtElement currentElement, CtRole role, List field, CtElement newValue)
void
FineModelChangeListener.onListAdd(CtElement currentElement, CtRole role, List field, int index, CtElement newValue)
a newValue is appended to the list corresponding to the role in the AST nodevoid
FineModelChangeListener.onListAdd(CtElement currentElement, CtRole role, List field, CtElement newValue)
a newValue is appended to the list corresponding to the role in the AST nodevoid
ActionBasedChangeListenerImpl.onListDelete(CtElement currentElement, CtRole role, List field, int index, CtElement oldValue)
void
ActionBasedChangeListenerImpl.onListDelete(CtElement currentElement, CtRole role, List field, Collection<? extends CtElement> oldValue)
void
EmptyModelChangeListener.onListDelete(CtElement currentElement, CtRole role, List field, int index, CtElement oldValue)
void
EmptyModelChangeListener.onListDelete(CtElement currentElement, CtRole role, List field, Collection<? extends CtElement> oldValue)
void
FineModelChangeListener.onListDelete(CtElement currentElement, CtRole role, List field, int index, CtElement oldValue)
an oldValue is deleted in the list corresponding to the role in the AST nodevoid
FineModelChangeListener.onListDelete(CtElement currentElement, CtRole role, List field, Collection<? extends CtElement> oldValue)
an oldValue is deleted in the list corresponding to the role in the AST nodevoid
ActionBasedChangeListenerImpl.onListDeleteAll(CtElement currentElement, CtRole role, List field, List oldValue)
void
EmptyModelChangeListener.onListDeleteAll(CtElement currentElement, CtRole role, List field, List oldValue)
void
FineModelChangeListener.onListDeleteAll(CtElement currentElement, CtRole role, List field, List oldValue)
a list corresponding to the role in the AST node is emptied<K, V> void
ActionBasedChangeListenerImpl.onMapAdd(CtElement currentElement, CtRole role, Map<K,V> field, K key, CtElement newValue)
<K, V> void
EmptyModelChangeListener.onMapAdd(CtElement currentElement, CtRole role, Map<K,V> field, K key, CtElement newValue)
<K, V> void
FineModelChangeListener.onMapAdd(CtElement currentElement, CtRole role, Map<K,V> field, K key, CtElement newValue)
a newValue is appended to the map corresponding to the role in the AST node<K, V> void
ActionBasedChangeListenerImpl.onMapDelete(CtElement currentElement, CtRole role, Map<K,V> field, K key, CtElement oldValue)
<K, V> void
EmptyModelChangeListener.onMapDelete(CtElement currentElement, CtRole role, Map<K,V> field, K key, CtElement oldValue)
<K, V> void
FineModelChangeListener.onMapDelete(CtElement currentElement, CtRole role, Map<K,V> field, K key, CtElement oldValue)
A mapping is removed from the map corresponding to the role in the AST node<K, V> void
ActionBasedChangeListenerImpl.onMapDeleteAll(CtElement currentElement, CtRole role, Map<K,V> field, Map<K,V> oldValue)
<K, V> void
EmptyModelChangeListener.onMapDeleteAll(CtElement currentElement, CtRole role, Map<K,V> field, Map<K,V> oldValue)
<K, V> void
FineModelChangeListener.onMapDeleteAll(CtElement currentElement, CtRole role, Map<K,V> field, Map<K,V> oldValue)
a map corresponding to the role in the AST node is emptiedvoid
ActionBasedChangeListenerImpl.onObjectDelete(CtElement currentElement, CtRole role, CtElement oldValue)
void
EmptyModelChangeListener.onObjectDelete(CtElement currentElement, CtRole role, CtElement oldValue)
void
FineModelChangeListener.onObjectDelete(CtElement currentElement, CtRole role, CtElement oldValue)
a field corresponding to the role is being set to nullvoid
ActionBasedChangeListenerImpl.onObjectUpdate(CtElement currentElement, CtRole role, Object newValue, Object oldValue)
void
ActionBasedChangeListenerImpl.onObjectUpdate(CtElement currentElement, CtRole role, CtElement newValue, CtElement oldValue)
void
EmptyModelChangeListener.onObjectUpdate(CtElement currentElement, CtRole role, Object newValue, Object oldValue)
void
EmptyModelChangeListener.onObjectUpdate(CtElement currentElement, CtRole role, CtElement newValue, CtElement oldValue)
void
FineModelChangeListener.onObjectUpdate(CtElement currentElement, CtRole role, Object newValue, Object oldValue)
a field corresponding to the role is being set in the AST nodevoid
FineModelChangeListener.onObjectUpdate(CtElement currentElement, CtRole role, CtElement newValue, CtElement oldValue)
a field corresponding to the role is being set in the AST nodevoid
ActionBasedChangeListenerImpl.onSetAdd(CtElement currentElement, CtRole role, Set field, CtElement newValue)
<T extends Enum>
voidActionBasedChangeListenerImpl.onSetAdd(CtElement currentElement, CtRole role, Set field, T newValue)
void
EmptyModelChangeListener.onSetAdd(CtElement currentElement, CtRole role, Set field, CtElement newValue)
<T extends Enum>
voidvoid
FineModelChangeListener.onSetAdd(CtElement currentElement, CtRole role, Set field, CtElement newValue)
a newValue is appended to the set corresponding to the role in the AST node<T extends Enum>
voida newValue is appended to the set corresponding to the role in the AST nodevoid
ActionBasedChangeListenerImpl.onSetDelete(CtElement currentElement, CtRole role, Set field, Collection<ModifierKind> oldValue)
void
ActionBasedChangeListenerImpl.onSetDelete(CtElement currentElement, CtRole role, Set field, CtElement oldValue)
void
ActionBasedChangeListenerImpl.onSetDelete(CtElement currentElement, CtRole role, Set field, ModifierKind oldValue)
void
EmptyModelChangeListener.onSetDelete(CtElement currentElement, CtRole role, Set field, Collection<ModifierKind> oldValue)
void
EmptyModelChangeListener.onSetDelete(CtElement currentElement, CtRole role, Set field, CtElement oldValue)
void
EmptyModelChangeListener.onSetDelete(CtElement currentElement, CtRole role, Set field, ModifierKind oldValue)
void
FineModelChangeListener.onSetDelete(CtElement currentElement, CtRole role, Set field, Collection<ModifierKind> oldValue)
an oldValue is deleted in the set corresponding to the role in the AST nodevoid
FineModelChangeListener.onSetDelete(CtElement currentElement, CtRole role, Set field, CtElement oldValue)
an oldValue is deleted in the set corresponding to the role in the AST nodevoid
FineModelChangeListener.onSetDelete(CtElement currentElement, CtRole role, Set field, ModifierKind oldValue)
an oldValue is deleted in the set corresponding to the role in the AST nodevoid
ActionBasedChangeListenerImpl.onSetDeleteAll(CtElement currentElement, CtRole role, Set field, Set oldValue)
void
EmptyModelChangeListener.onSetDeleteAll(CtElement currentElement, CtRole role, Set field, Set oldValue)
void
FineModelChangeListener.onSetDeleteAll(CtElement currentElement, CtRole role, Set field, Set oldValue)
a set corresponding to the role in the AST node is emptiedModifier and TypeMethodDescriptionvoid
ActionBasedChangeListenerImpl.onListDelete(CtElement currentElement, CtRole role, List field, Collection<? extends CtElement> oldValue)
void
EmptyModelChangeListener.onListDelete(CtElement currentElement, CtRole role, List field, Collection<? extends CtElement> oldValue)
void
FineModelChangeListener.onListDelete(CtElement currentElement, CtRole role, List field, Collection<? extends CtElement> oldValue)
an oldValue is deleted in the list corresponding to the role in the AST node -
Uses of CtElement in spoon.support.modelobs.context
ModifierConstructorDescriptionCollectionContext(CtElement element, CtRole role, T copyOfTheCollection)
ListContext(CtElement element, CtRole role, List<?> original)
ListContext(CtElement element, CtRole role, List<?> original, int position)
ObjectContext(CtElement ctElement, CtRole role)
SetContext(CtElement element, CtRole role, Set<?> original)
-
Uses of CtElement in spoon.support.reflect
-
Uses of CtElement in spoon.support.reflect.code
Modifier and TypeClassDescriptionclass
class
CtArrayAccessImpl<T,V extends CtExpression<?>>
class
class
class
CtAssertImpl<T>
class
CtAssignmentImpl<T,A extends T>
class
class
CtBlockImpl<R>
class
class
CtCaseImpl<E>
class
class
class
class
class
class
class
class
class
class
class
CtExecutableReferenceExpressionImpl<T,E extends CtExpression<?>>
class
class
class
class
class
class
class
class
class
class
class
CtLambdaImpl<T>
class
class
class
class
class
class
CtOperatorAssignmentImpl<T,A extends T>
class
CtReturnImpl<R>
class
class
class
class
CtSwitchExpressionImpl<T,S>
class
CtSwitchImpl<S>
class
class
CtTargetedExpressionImpl<E,T extends CtExpression<?>>
class
class
class
class
class
class
class
class
class
class
class
class
class
CtYieldStatementImplModifier and TypeMethodDescription<E extends CtElement>
ECtTypeAccessImpl.setImplicit(boolean implicit)
<E extends CtElement>
E<E extends CtElement>
ECtStatementListImpl.setPosition(SourcePosition position)
-
Uses of CtElement in spoon.support.reflect.cu
-
Uses of CtElement in spoon.support.reflect.declaration
Modifier and TypeClassDescriptionclass
CtAnnotationImpl<A extends Annotation>
The implementation forCtAnnotation
.class
The implementation forCtAnnotationMethod
.class
CtAnnotationTypeImpl<T extends Annotation>
The implementation forCtAnnotationType
.class
class
CtClassImpl<T>
The implementation forCtClass
.class
Implements a compilation unit.class
class
Contains the default implementation of most CtElement methods.class
CtEnumImpl<T extends Enum<?>>
class
class
The implementation forCtExecutable
.class
CtFieldImpl<T>
The implementation forCtField
.class
class
class
CtMethodImpl<T>
The implementation forCtMethod
.class
class
class
class
class
class
The implementation forCtPackage
.class
The implementation forCtParameter
.class
class
class
class
CtTypeImpl<T>
The implementation forCtType
.class
class
class
This class is used to represent the constructor of an array when calling with an expression likeModifier and TypeMethodDescription<E extends CtElement>
ECtElementImpl.addAnnotation(CtAnnotation<? extends Annotation> annotation)
<E extends CtElement>
ECtElementImpl.addComment(CtComment comment)
CtElementImpl.filterChildren(Filter<P> predicate)
CtElementImpl.getAnnotatedChildren(Class<? extends Annotation> annotationType)
CtElementImpl.getElements(Filter<E> filter)
<P extends CtElement>
P<E extends CtElement>
E<E extends CtElement>
ECtElementImpl.putMetadata(String key, Object val)
<E extends CtElement>
ECtElementImpl.removeComment(CtComment comment)
<E extends CtElement>
voidCtElementImpl.replace(Collection<E> elements)
<E extends CtElement>
ECtElementImpl.setAllMetadata(Map<String,Object> metadata)
<E extends CtElement>
ECtElementImpl.setAnnotations(List<CtAnnotation<? extends Annotation>> annotations)
<E extends CtElement>
ECtElementImpl.setComments(List<CtComment> comments)
<E extends CtElement>
ECtElementImpl.setDocComment(String docComment)
<E extends CtElement>
ECtElementImpl.setImplicit(boolean implicit)
<E extends CtElement>
E<E extends CtElement>
E<T extends CtElement>
T<E extends CtElement>
E<E extends CtElement>
ECtCompilationUnitImpl.setPosition(SourcePosition position)
<E extends CtElement>
ECtElementImpl.setPosition(SourcePosition position)
<E extends CtElement>
ECtElementImpl.setPositions(SourcePosition position)
<E extends CtElement, T>
ECtElementImpl.setValueByRole(CtRole role, T value)
Modifier and TypeMethodDescriptionCtElementImpl.clone()
CtAnnotationImpl.getAnnotatedElement()
CtCompilationUnitImpl.getParent()
CtElementImpl.getParent()
CtModuleImpl.getParent()
Modifier and TypeMethodDescriptionCtElementImpl.asIterable()
CtElementImpl.descendantIterator()
CtElementImpl.getDirectChildren()
-
Uses of CtElement in spoon.support.reflect.eval
Modifier and TypeMethodDescription<R extends CtElement>
RVisitorPartialEvaluator.evaluate(R element)
Modifier and TypeMethodDescriptionstatic Object
EvalHelper.convertElementToRuntimeObject(CtElement value)
Evaluates and converts CtExpression to their equivalent runtime objects eg "CtLiteral(3) + CtLiteral(4)" -> 7protected void
protected void
-
Uses of CtElement in spoon.support.reflect.reference
Modifier and TypeClassDescriptionclass
class
class
class
class
class
An implementation forCtLocalVariableReference
.class
class
class
class
class
This class intends to be used only to represent the reference of a static import of all members of a type: import static org.junit.Assert.*;class
class
class
represents a reference to an unbound field (used when no full classpath is availableclass
class
Modifier and TypeMethodDescription<E extends CtElement>
ECtTypeMemberWildcardImportReferenceImpl.addAnnotation(CtAnnotation<? extends Annotation> annotation)
<E extends CtElement>
ECtTypeMemberWildcardImportReferenceImpl.setAnnotations(List<CtAnnotation<? extends Annotation>> annotations)
<E extends CtElement>
ECtUnboundVariableReferenceImpl.setAnnotations(List<CtAnnotation<? extends Annotation>> annotations)
<E extends CtElement>
ECtReferenceImpl.setComments(List<CtComment> comments)
<E extends CtElement>
ECtTypeMemberWildcardImportReferenceImpl.setImplicit(boolean implicit)
-
Uses of CtElement in spoon.support.sniper
Modifier and TypeMethodDescriptionstatic boolean
SniperJavaPrettyPrinter.hasImplicitAncestor(CtElement el)
Warning, not in the API, public for testing purposesSniperJavaPrettyPrinter.printElement(CtElement element)
The sniper mode only works from JavaOutputProcessorSniperJavaPrettyPrinter.printElementSniper(CtElement element)
Warning: debug and test method only, not part of the public APICalled wheneverDefaultJavaPrettyPrinter
scans/prints an element Warning: DO not call on a cloned element. -
Uses of CtElement in spoon.support.sniper.internal
Modifier and TypeMethodDescriptionstatic ElementSourceFragment
ElementSourceFragment.createSourceFragmentsFrom(CtElement element)
Builds a tree of source fragments for `element` and all its children, based on the source positions of each elementModifierConstructorDescriptionChangeResolver(ChangeCollector changeCollector, CtElement element)
ElementPrinterEvent(CtRole role, CtElement element)
SourceFragmentContextList(MutableTokenWriter mutableTokenWriter, CtElement element, List<SourceFragment> fragments, ChangeResolver changeResolver)
-
Uses of CtElement in spoon.support.util
Modifier and TypeClassDescriptionclass
The implementation of theList
, which is used by Spoon model objects.class
Deprecated.This set is no longer actively used or maintained.class
QualifiedNameBasedSortedSet<E extends CtElement>
The set properties of this set are based on the qualified name of the element inserted.Modifier and TypeMethodDescriptionprotected abstract CtElement
ModelList.getOwner()
protected abstract CtElement
ModelSet.getOwner()
Deprecated.ModifierConstructorDescriptionprotected
ModelSet(Comparator<? super CtElement> comparator)
Deprecated. -
Uses of CtElement in spoon.support.util.internal
Modifier and TypeClassDescriptionclass
ElementNameMap<T extends CtElement>
This class is for internal use only.Modifier and TypeMethodDescriptionstatic void
ModelCollectionUtils.linkToParent(CtElement owner, CtElement element)
Changes the parent of a CtElement to the passed owner iff the element does not already have a different parent. -
Uses of CtElement in spoon.support.visitor
-
Uses of CtElement in spoon.support.visitor.clone
Modifier and TypeMethodDescriptionstatic <T extends CtElement>
TCloneBuilder.build(CloneBuilder builder, CtElement element, CtElement other)
<T extends CtElement>
TCloneVisitor.getClone()
Modifier and TypeMethodDescriptionstatic <T extends CtElement>
TCloneBuilder.build(CloneBuilder builder, CtElement element, CtElement other)
void
void
CloneBuilder.scanCtElement(CtElement e)
Scans an abstract element.void
-
Uses of CtElement in spoon.support.visitor.equals
Modifier and TypeMethodDescriptionprotected <T extends CtElement>
voidCloneHelper.addClone(Collection<T> targetCollection, T element)
clones an element and adds it's clone as value into targetCollectionprotected <T extends CtElement>
voidclones a value and adds it's clone as value into targetMap under key<T extends CtElement>
Collection<T>CloneHelper.clone(Collection<T> elements)
clones a Set of elements<T extends CtElement>
TCloneHelper.clone(T element)
Modifier and TypeMethodDescriptionvoid
void
boolean
EqualsVisitor.checkEquals(CtElement element, CtElement other)
protected void
static boolean
void
void
Is called byCloneVisitor
at the end of the cloning for each element.Modifier and TypeMethodDescriptionprotected void
EqualsVisitor.biScan(CtRole role, Collection<? extends CtElement> elements, Collection<? extends CtElement> others)
-
Uses of CtElement in spoon.support.visitor.replace
Modifier and TypeInterfaceDescriptioninterface
ReplaceListener<T extends CtElement>
Interface for the AST node replacement infrastructure.Modifier and TypeMethodDescriptionstatic <E extends CtElement>
voidReplacementVisitor.replace(CtElement original, Collection<E> replaces)
-
Uses of CtElement in spoon.template
Modifier and TypeClassDescriptionclass
AbstractTemplate<T extends CtElement>
handles the well-formedness and helper methods of templatesinterface
A template code is simply a piece of code that uses aTemplateParameter
's instance.Modifier and TypeMethodDescriptionFinds all target program sub-trees that correspond to a template.static <E extends CtElement>
ESubstitution.substitute(CtType<?> targetType, Template<?> template, E code)
Substitutes all the template parameters in a random piece of code.Modifier and TypeMethodDescriptionFinds all target program sub-trees that correspond to a template.void
TemplateMatcher.forEachMatch(CtElement rootElement, CtConsumer<Match> consumer)
Finds all target program sub-trees that correspond to a template and calls consumer.accept(matchingElement, )boolean
static void
Substitution.redirectTypeReferences(CtElement element, CtTypeReference<?> source, CtTypeReference<?> target)
A helper method that recursively redirects all the type references from a source type to a target type in the given element.ModifierConstructorDescriptionTemplateMatcher(CtElement templateRoot)
Constructs a matcher for a given template.TemplateMatcher(CtElement templateRoot, CtClass<?> templateType)
Constructs a matcher for a given template. -
Uses of CtElement in spoon.testing
Modifier and TypeMethodDescriptionstatic AbstractCtElementAssert<?>
Assert.assertThat(CtElement actual)
Create a new instance of
.CtElementAssert
Verifies that the actual value is equal to the given one.ModifierConstructorDescriptionprotected
AbstractCtElementAssert(CtElement actual, Class<?> selfType)
protected
CtElementAssert(CtElement actual)
-
Uses of CtElement in spoon.testing.utils
Modifier and TypeMethodDescriptionCheck.assertIsSame(A actual, E expected)
Check.assertIsSame(A actual, E expected)
Modifier and TypeMethodDescriptionstatic void
Check.assertCtElementEquals(CtElement ct1, CtElement ct2)
if ct1 is not equals to ct2, tells the exact difference