Uses of Interface
spoon.reflect.declaration.CtElement
Packages that use 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 TypeMethodDescriptionvoidContractVerifier.checkParentConsistency(CtElement element)public modifier for testing purpose only, not in the public APIModifier and TypeMethodDescriptionvoidSpoonModelBuilder.process(Collection<Processor<? extends CtElement>> processors)Processes the Java model with the given processors. -
Uses of CtElement in spoon.compiler
Methods in spoon.compiler that return types with arguments of type CtElementModifier and TypeMethodDescriptionFileGenerator<? extends CtElement>Environment.getDefaultFileGenerator()Returns the default file generator for this environment (gives the default output directory for the created files).Methods in spoon.compiler with parameters of type CtElementModifier and TypeMethodDescriptionvoidHelper method called by a processor to report an error, warning or message as dictated by the severity parameter.Method parameters in spoon.compiler with type arguments of type CtElementModifier and TypeMethodDescriptionvoidEnvironment.setDefaultFileGenerator(FileGenerator<? extends CtElement> generator)Sets the default file generator for this environment. -
Uses of CtElement in spoon.experimental
Classes in spoon.experimental that implement CtElementMethods in spoon.experimental with parameters of type CtElement -
Uses of CtElement in spoon.metamodel
Methods in spoon.metamodel that return types with arguments of type CtElementMethod parameters in spoon.metamodel with type arguments of type CtElementModifier and TypeMethodDescriptionMetamodel.getConcept(Class<? extends CtElement> clazz)static StringMetamodel.getConceptName(Class<? extends CtElement> conceptClass) -
Uses of CtElement in spoon.pattern
Methods in spoon.pattern with type parameters of type CtElementModifier 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 aImmutableMapas parameter (a Spoon elegant utility type)Methods in spoon.pattern that return CtElementMethods in spoon.pattern that return types with arguments of type CtElementModifier and TypeMethodDescriptionMatch.getMatchingElements()PatternBuilderHelper.getPatternElements()Methods in spoon.pattern with parameters of type CtElementModifier and TypeMethodDescriptionElements will be substituted by parameter valueAttribute defined by `role` of `element` will be substituted by parameter valuePatternParameterConfigurator.ParameterElementPair.copyAndSet(CtElement element)static PatternBuilderPattern.getMatches(CtElement root)Finds all target program sub-trees that correspond to this pattern and returns them.Method parameters in spoon.pattern with type arguments of type CtElementModifier and TypeMethodDescriptionstatic PatternBuilderCreates aPatternBuilderfrom the List of template elementsPatternBuilderHelper.keepTypeMembers(Filter<? super CtElement> filter)Constructors in spoon.pattern with parameters of type CtElementConstructor parameters in spoon.pattern with type arguments of type CtElement -
Uses of CtElement in spoon.pattern.internal
Methods in spoon.pattern.internal with type parameters of type CtElementMethods in spoon.pattern.internal with parameters of type CtElementModifier and TypeMethodDescriptionvoidDefaultGenerator.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
Methods in spoon.pattern.internal.matcher with parameters of type CtElementMethod parameters in spoon.pattern.internal.matcher with type arguments of type CtElement -
Uses of CtElement in spoon.pattern.internal.node
Methods in spoon.pattern.internal.node with parameters of type CtElementModifier and TypeMethodDescriptionstatic ElementNodeCreates an implicitElementNode, which contains all non derived attributes of `element` and all it's childrenprotected voidElementNode.generateSingleNodeAttributes(DefaultGenerator generator, CtElement clone, ImmutableMap parameters)protected ImmutableMapElementNode.matchesRole(ImmutableMap parameters, CtElement target, MetamodelProperty mmField, RootNode attrNode)Method parameters in spoon.pattern.internal.node with type arguments of type CtElementModifier and TypeMethodDescriptionstatic ListOfNodesSame likeElementNode.create(CtElement, Map)but withListof elements or primitive objectsstatic ListOfNodesSame likeElementNode.create(CtElement, Map)but withSetof elements or primitive objectsstatic ElementNodeCreates an implicitElementNode, which contains all non derived attributes of `element` and all it's childrenElementNode.getOrCreateNodeOfRole(CtRole role, Map<CtElement,RootNode> patternElementToSubstRequests)Constructors in spoon.pattern.internal.node with parameters of type CtElementModifierConstructorDescriptionElementNode(MetamodelConcept elementType, CtElement templateElement) -
Uses of CtElement in spoon.processing
Classes in spoon.processing with type parameters of type CtElementModifier and TypeClassDescriptionclassAbstractAnnotationProcessor<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.classAbstractParallelProcessor<E extends CtElement>AbstractParallelProcessor allows using multiple threads for concurrent processing withAbstractProcessor.classAbstractProcessor<E extends CtElement>This class defines an abstract processor to be subclassed by the user for defining new processors.interfaceAnnotationProcessor<A extends Annotation,E extends CtElement>This interface defines an annotation processor.interfaceFileGenerator<T extends CtElement>This interface should be implemented by processing tasks that generate new files as processing results.interfaceThis interface defines a generic code processor.Methods in spoon.processing that return types with arguments of type CtElementModifier and TypeMethodDescriptionAbstractManualProcessor.getProcessedElementTypes()Invalid method in this context.AbstractProcessor.getProcessedElementTypes()Processor.getProcessedElementTypes()Gets all the element types than need to be processed.Methods in spoon.processing with parameters of type CtElementModifier and TypeMethodDescriptionbooleanAbstractManualProcessor.isToBeProcessed(CtElement candidate)Always returns false in this context.voidDoes nothing in this context.voidRecursively processes aCtElementwith this manager.Method parameters in spoon.processing with type arguments of type CtElementModifier and TypeMethodDescriptionprotected voidAbstractManualProcessor.addProcessedElementType(Class<? extends CtElement> elementType)Invalid method in this context.protected voidAbstractProcessor.addProcessedElementType(Class<? extends CtElement> elementType)Adds a processed element type.voidProcessingManager.process(Collection<? extends CtElement> elements)Recursively processes a collection ofCtElements with this manager.protected voidAbstractProcessor.removeProcessedElementType(Class<? extends CtElement> elementType)Removes a processed element type. -
Uses of CtElement in spoon.reflect
Classes in spoon.reflect that implement CtElementMethods in spoon.reflect with type parameters of type CtElementModifier 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
Subinterfaces of CtElement in spoon.reflect.codeModifier and TypeInterfaceDescriptioninterfaceThis code element defines an abstract invocation on aCtExecutable.interfaceThis code element defines an abstract switch (either switch statement or switch expression).interfaceThis code element defines an access to a annotation parameter variable.interfaceCtArrayAccess<T,E extends CtExpression<?>>This code element defines a one-dimensional array access.interfaceCtArrayRead<T>This code element defines a read access to an array.interfaceCtArrayWrite<T>This code element defines a write access to an array.interfaceCtAssert<T>This code element defines an assert clause.interfaceCtAssignment<T,A extends T>This code element defines an assignment.interfaceThis interface defines a binary operator.interfaceCtBlock<R>This code element represents a block of code, that is to say a list of statements enclosed in curly brackets.interfaceThis abstract code element defines an element, which contains a bodyinterfaceThis code element defines a break statement.interfaceCtCase<S>This code element defines a case within a switch-case.interfaceThis code element defines acatchof atry.interfaceThis code element defines an exception variable in a catch.interfaceThis abstract code element represents all the statements that break the control flow of the program.interfaceThis interface is the root interface of the code elements.interfaceThis element is a code snippet that must represent an expression and can thus be inserted in the program's model as is.interfaceThis element is a code snippet that must represent a statement and can thus be inserted in the program's model as is.interfaceThis code element defines a comment Example:int x = 0; // a commentinterfaceThis code element defines conditional expressions using the ? (ternary expressions).interfaceThis code element represents a constructor call.interfaceThis code element defines the continue statement.interfaceThis code element defines adoloop.interfaceCtExecutableReferenceExpression<T,E extends CtExpression<?>>This abstract code element defines an expression which represents an executable reference.interfaceCtExpression<T>This abstract code element defines a typed expression.interfaceThis code element defines an access to a field variable (read and write)interfaceCtFieldRead<T>This code element defines a read access to a field.interfaceCtFieldWrite<T>This code element defines a write access to a field.interfaceThis code element defines a for loop.interfaceThis code element defines a foreach statement.interfaceThis code element represents anifstatement.interfaceCtInvocation<T>This code element defines a concrete invocation.interfaceThis code element defines a javadoc comment Example:interfaceThis code element defines a javadoc tag Example:interfaceThis abstract code element represents all the statements that break the control flow of the program and which can support a label.interfaceCtLambda<T>This code element represents the creation of a lambda.interfaceCtLiteral<T>This code element defines a literal value (an int, a string, etc).interfaceThis code element defines a local variable definition (within an executable body).interfaceThis abstract code element defines a loop.interfaceCtNewArray<T>This code element defines the inline creation of a new array.interfaceCtNewClass<T>This code element represents the creation of a anonymous class.interfaceCtOperatorAssignment<T,A extends T>This code element defines an self-operated assignment such as += or *=.interfaceThis interface represents a common super type for different patterns implemented in the Java language.interfaceCtResource<T>This code element defines a resource used in the try-with-resource statement.interfaceCtReturn<R>This code element represents areturnstatement.interfaceThis abstract code element represents all the statements, which can be part of a block.interfaceThis code element represents a list of statements.interfaceThis code element defines an access to super.interfaceCtSwitch<S>This code element defines a switch statement.interfaceCtSwitchExpression<T,S>This code element defines a switch expression.interfaceThis code element defines asynchronizedstatement.interfaceCtTargetedExpression<T,E extends CtExpression<?>>This abstract code element defines an expression which contains a target expression.interfaceThis code element defines a Text Block String Literal.interfaceCtThisAccess<T>This code element defines an access to this.interfaceThis code element defines athrowstatement.interfaceThis code element defines atrystatement.interfaceThis code element defines atrywith resource statement.interfaceCtTypeAccess<A>This code element represents a type reference usable as an expression.interfaceThis code element defines a type pattern, introduced in Java 16 by JEP 394.interfaceThis code element represents a unary operator.interfaceThis code element defines an access to a variable (read and write).interfaceThis code element defines an read access to a variable.interfaceThis code element defines a write to a variable.interfaceThis code element defines awhileloop.interfaceThis code element defines ayieldstatement.Methods in spoon.reflect.code with type parameters of type CtElementModifier and TypeMethodDescription<E extends CtElement>
ECtTypeAccess.setImplicit(boolean implicit)CallsCtTypeAccess.getAccessedType().setImplicit() -
Uses of CtElement in spoon.reflect.cu
Subinterfaces of CtElement in spoon.reflect.cu -
Uses of CtElement in spoon.reflect.cu.position
Classes in spoon.reflect.cu.position that implement CtElement -
Uses of CtElement in spoon.reflect.declaration
Subinterfaces of CtElement in spoon.reflect.declarationModifier and TypeInterfaceDescriptioninterfaceCtAnnotation<A extends Annotation>This element represents an annotation on an element.interfaceThis element defines an annotation method declared in an annotation type.interfaceCtAnnotationType<T extends Annotation>This element defines an annotation type.interfaceThis element defines an anonymous executable block declaration in a class.interfaceCtClass<T>This element represents a class declaration.interfaceDefines a compilation unit.interfaceThis element defines a constructor declaration.interfaceThis element represents an enumeration declaration.interfaceCtEnumValue<T>Corresponds to one enum value specified in an enumeration.interfaceCtExecutable<R>This element represents an executable element such as a method, a constructor, or an anonymous block.interfaceCtField<T>This element defines a field declaration.interfaceThis abstract element defines a declaration that accepts formal type parameters (aka generics), such as a CtType (class A<E>), CtMethod or CtConstructor.interfaceThis element represents an import declaration.interfaceCtInterface<T>This element defines an interface declaration.interfaceCtMethod<T>This element defines a method declaration.interfaceThis interface defines an element that accepts modifiers.interfaceRepresents a Java module as defined in Java 9.interfaceRepresents a directive of aCtModuleThe 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.interfaceRepresents 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.interfaceDefined an element with several types.interfaceDeclares an element that has a name (a class, a method, a variable, etc).interfaceThis element defines a package declaration.interfaceThis element represents an package declaration.interfaceRepresents 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.interfaceCtParameter<T>This element defines an executable parameter declaration.interfaceRepresents a provided service in aCtModule.interfaceThis element represents a record declaration.interfaceThis element represents a record component.interfaceCtType<T>This abstract element defines a super-type for classes and interfaces, which can declare methods.interfaceThis abstract element defines a typed element.interfaceThis interface represents a member of a class (field, method, nested class or static/instance initializer).interfaceThis element defines a declaration of a type parameter (aka generics).interfaceRepresents the declaration of a used service in aCtModuleThe uses directive specifies a service for which the current module may discover providers via java.util.ServiceLoader.interfaceCtVariable<T>This abstract element defines a variable declaration.Methods in spoon.reflect.declaration with type parameters of type CtElementModifier 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.Methods in spoon.reflect.declaration that return CtElementModifier 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.Methods in spoon.reflect.declaration that return types with arguments of type CtElementModifier 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()Methods in spoon.reflect.declaration with parameters of type CtElementModifier and TypeMethodDescriptionstatic CtAnnotatedElementTypeCtAnnotation.getAnnotatedElementTypeForCtElement(CtElement element)booleanTells if the given element is a direct or indirect parent.voidReplaces 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
Methods in spoon.reflect.eval with type parameters of type CtElement -
Uses of CtElement in spoon.reflect.factory
Classes in spoon.reflect.factory that implement CtElementMethods in spoon.reflect.factory with type parameters of type CtElementModifier and TypeMethodDescription<T extends CtElement>
TCoreFactory.clone(T element)Recursively clones a given element of the metamodel and all its child elements.Methods in spoon.reflect.factory that return CtElementModifier 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()Methods in spoon.reflect.factory with parameters of type CtElementModifier 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.Method parameters in spoon.reflect.factory with type arguments of type CtElementModifier 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
Methods in spoon.reflect.meta.impl with parameters of type CtElementModifier and TypeMethodDescriptionstatic RoleHandlerRoleHandlerHelper.getRoleHandlerWrtParent(CtElement element)Method parameters in spoon.reflect.meta.impl with type arguments of type CtElementModifier and TypeMethodDescriptionstatic RoleHandlerRoleHandlerHelper.getOptionalRoleHandler(Class<? extends CtElement> targetClass, CtRole role)static RoleHandlerRoleHandlerHelper.getRoleHandler(Class<? extends CtElement> targetClass, CtRole role)static List<RoleHandler>RoleHandlerHelper.getRoleHandlers(Class<? extends CtElement> targetClass) -
Uses of CtElement in spoon.reflect.path
Methods in spoon.reflect.path with type parameters of type CtElementModifier 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.Methods in spoon.reflect.path with parameters of type CtElementModifier 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
Classes in spoon.reflect.path.impl with type parameters of type CtElementModifier and TypeClassDescriptionclassAbstractPathElement<P extends CtElement,T extends CtElement>Partial implementation for CtPathElementclassAbstractPathElement<P extends CtElement,T extends CtElement>Partial implementation for CtPathElementinterfaceCtPathElement<P extends CtElement,T extends CtElement>A single path element from a CtPath.interfaceCtPathElement<P extends CtElement,T extends CtElement>A single path element from a CtPath.classCtTypedNameElement<P extends CtElement,T extends CtElement>spoon.reflect.path.impl.CtPathElement that match on CtNamedElementclassCtTypedNameElement<P extends CtElement,T extends CtElement>spoon.reflect.path.impl.CtPathElement that match on CtNamedElementMethods in spoon.reflect.path.impl with type parameters of type CtElementMethods in spoon.reflect.path.impl that return types with arguments of type CtElementModifier and TypeMethodDescriptionCtNamedPathElement.getElements(Collection<CtElement> roots)CtRolePathElement.getElements(Collection<CtElement> roots)CtNamedPathElement.scanElements(Collection<? extends CtElement> roots)Methods in spoon.reflect.path.impl with parameters of type CtElementModifier and TypeMethodDescriptionCtPathImpl.evaluateOn(CtElement... startNode)CtPathImpl.relativePath(CtElement parent)Method parameters in spoon.reflect.path.impl with type arguments of type CtElementModifier and TypeMethodDescriptionCtNamedPathElement.getElements(Collection<CtElement> roots)CtRolePathElement.getElements(Collection<CtElement> roots)CtNamedPathElement.scanElements(Collection<? extends CtElement> roots) -
Uses of CtElement in spoon.reflect.reference
Subinterfaces of CtElement in spoon.reflect.referenceModifier and TypeInterfaceDescriptioninterfaceThis interface defines a reference to an array.interfaceThis interface defines a reference toCtCatchVariable.interfaceThis interface defines a reference to aCtExecutable.interfaceThis interface defines a reference to aCtField.interfaceThis interface defines a reference to an intersection type in generics or in casts.interfaceThis interface defines a reference toCtLocalVariable.interfaceRepresents a reference to aCtModuleinterfaceThis interface defines a reference to aCtPackage.interfaceThis interface defines a reference to aCtParameterof a method.interfaceThis is the root interface for named program element references, such as fields, types, variables, and so on.interfaceThis interface defines a import reference to all static type members of a type.
Example:somePackage.Type.*;interfaceThis interface defines a reference to a type parameter (aka generics).interfaceThis interface defines a reference to aCtTypeor sub-type.interfaceThis interface defines a reference to an unboundCtVariable.interfaceThis interface defines a reference to aCtVariableor sub-type.interfaceRepresents a wildcard in generic type annotations, i.e.Methods in spoon.reflect.reference with type parameters of type CtElementModifier 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)Methods in spoon.reflect.reference that return CtElementModifier 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
Classes in spoon.reflect.visitor with type parameters of type CtElementModifier and TypeInterfaceDescriptioninterfaceThis interface defines a filter for program elements.Fields in spoon.reflect.visitor with type parameters of type CtElementModifier and TypeFieldDescriptionCtDequeScanner.elementsDequeThe stack of elements.DefaultJavaPrettyPrinter.preprocessorsHandle imports of classes.CtBiScannerDefault.stackMethods in spoon.reflect.visitor with type parameters of type CtElementModifier 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.Methods in spoon.reflect.visitor that return CtElementModifier and TypeMethodDescriptionLexicalScope.getScopeElement()CtBFSIterator.next()Dereference the "iterator"CtIterator.next()Dereference the "iterator"Methods in spoon.reflect.visitor that return types with arguments of type CtElementMethods in spoon.reflect.visitor with parameters of type CtElementModifier 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 numbervoidDefaultJavaPrettyPrinter.applyPreProcessors(CtElement el)Warning, this may change the state of the objectabstract voidThis method is called to compare `element` and `other` when traversing two trees in parallel.abstract voidThis method is called to compare `element` and `other` according to the role when traversing two trees in parallel.voidvoidvoidImportScanner.computeImports(CtElement element)Computes import of aCtElementvoidImportScannerImpl.computeImports(CtElement element)protected voidEarlyTerminatingScanner.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 voidprotected voidPushes the element.protected voidThis method is called by the scanner when entering a scanned element.protected voidThis method is called byDefaultJavaPrettyPrinter.scan(CtElement)when entering a scanned element.protected voidprotected voidvoidEnters an element.protected voidprotected voidPops the element.protected voidThis method is called by the scanner when exiting a scanned element.protected voidThis method is called byDefaultJavaPrettyPrinter.scan(CtElement)when entering a scanned element.protected voidprotected voidprotected voidExits 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)voidPrinterHelper.mapLine(CtElement e, CtCompilationUnit unitExpected)protected voidCalled 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.voidvoidprevent scanner from going down the tree, instead save with other CtElement children of the current nodevoidGenerically scans a meta-model element.voidprevent scanner from going down the tree, instead save with other CtElement children of the current nodevoidGenerically scans a meta-model element.voidGenerically scans a meta-model element.The generic scan method for an element.voidvoidvoidvoidCtInheritanceScanner.scanCtElement(CtElement e)Scans an abstract element.voidElementPrinterHelper.writeAnnotations(CtElement element)Writes the annotations for the given element.voidElementPrinterHelper.writeComment(CtElement element)voidElementPrinterHelper.writeComment(CtElement element, CommentOffset offset)Method parameters in spoon.reflect.visitor with type arguments of type CtElementModifier and TypeMethodDescriptionprotected voidCtBiScannerDefault.biScan(CtRole role, Collection<? extends CtElement> elements, Collection<? extends CtElement> others)voidCtInheritanceScanner.scan(Collection<? extends CtElement> elements)Generically scans a collection of meta-model elements.voidCtScanner.scan(Collection<? extends CtElement> elements)Generically scans a collection of meta-model elements.voidCtScanner.scan(CtRole role, Collection<? extends CtElement> elements)Generically scans a collection of meta-model elements.voidGenerically scans a Map of meta-model elements.voidEarlyTerminatingScanner.scan(CtRole role, Collection<? extends CtElement> elements)voidvoidDefaultJavaPrettyPrinter.setPreprocessors(List<Processor<CtElement>> preprocessors)Set preprocessors that the printer automatically runs on the model before printing it.Constructors in spoon.reflect.visitor with parameters of type CtElementModifierConstructorDescriptionAccessibleVariablesFinder(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
Methods in spoon.reflect.visitor.chain with type parameters of type CtElementModifier 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>
CtQueryImplMethods in spoon.reflect.visitor.chain with parameters of type CtElementModifier and TypeMethodDescriptiondefault ScanningModeCalled before the scanner enters an elementdefault ScanningModeCalled before the scanner enters an elementdefault voidThis method is called after the element and all its children have been visited.default voidThis method is called after the element and all its children have been visited. -
Uses of CtElement in spoon.reflect.visitor.filter
Classes in spoon.reflect.visitor.filter with type parameters of type CtElementModifier and TypeClassDescriptionclassAbstractFilter<T extends CtElement>Defines an abstract filter based on matching on the element types.classAnnotationFilter<E extends CtElement>This filter matches all the elements annotated with a given annotation type.classCompositeFilter<T extends CtElement>This class defines a composite filter, which can compose several filters together by usingFilteringOperator.classRegexFilter<E extends CtElement>Filters elements with a regular expression on the element's code.classTypeFilter<T extends CtElement>This simple filter matches all the elements of a given type.Fields in spoon.reflect.visitor.filter declared as CtElementMethods in spoon.reflect.visitor.filter that return types with arguments of type CtElementMethods in spoon.reflect.visitor.filter with parameters of type CtElementModifier and TypeMethodDescriptionvoidCtScannerFunction.apply(CtElement input, CtConsumer<Object> outputConsumer)voidFieldReferenceFunction.apply(CtElement fieldOrScope, CtConsumer<Object> outputConsumer)voidLocalVariableReferenceFunction.apply(CtElement scope, CtConsumer<Object> outputConsumer)voidParentFunction.apply(CtElement input, CtConsumer<Object> outputConsumer)voidPotentialVariableDeclarationFunction.apply(CtElement input, CtConsumer<Object> outputConsumer)voidSiblingsFunction.apply(CtElement input, CtConsumer<Object> outputConsumer)voidVariableReferenceFunction.apply(CtElement variableOrScope, CtConsumer<Object> outputConsumer)protected voidprotected voidvoidbooleanConstructors in spoon.reflect.visitor.filter with parameters of type CtElement -
Uses of CtElement in spoon.support
Methods in spoon.support with type parameters of type CtElementMethods in spoon.support that return CtElementModifier and TypeMethodDescriptionMethods in spoon.support that return types with arguments of type CtElementModifier and TypeMethodDescriptionFileGenerator<? extends CtElement>StandardEnvironment.getDefaultFileGenerator()Methods in spoon.support with parameters of type CtElementModifier and TypeMethodDescriptionvoidvoidvoidRecursively processes an element and its children with a given processor.voidMethod parameters in spoon.support with type arguments of type CtElementModifier and TypeMethodDescriptionvoidQueueProcessingManager.process(Collection<? extends CtElement> elements)voidRuntimeProcessingManager.process(Collection<? extends CtElement> elements)voidRuntimeProcessingManager.process(Collection<? extends CtElement> elements, Processor<?> processor)Recursively processes elements and their children with a given processor.voidStandardEnvironment.setDefaultFileGenerator(FileGenerator<? extends CtElement> defaultFileGenerator) -
Uses of CtElement in spoon.support.comparator
Methods in spoon.support.comparator with parameters of type CtElementModifier and TypeMethodDescriptionintReturns 0 if o1 has the same position as o2, or both positions are invalid and o1.equals(o2).intintint -
Uses of CtElement in spoon.support.compiler.jdt
Fields in spoon.support.compiler.jdt declared as CtElementMethods in spoon.support.compiler.jdt with parameters of type CtElementMethod parameters in spoon.support.compiler.jdt with type arguments of type CtElementModifier and TypeMethodDescriptionvoidJDTBasedSpoonCompiler.process(Collection<Processor<? extends CtElement>> processors)Constructors in spoon.support.compiler.jdt with parameters of type CtElement -
Uses of CtElement in spoon.support.gui
Methods in spoon.support.gui with parameters of type CtElementModifier and TypeMethodDescriptionvoidvoidvoidConstructors in spoon.support.gui with parameters of type CtElement -
Uses of CtElement in spoon.support.modelobs
Methods in spoon.support.modelobs with parameters of type CtElementModifier and TypeMethodDescriptionChangeCollector.getChanges(CtElement currentElement)Return the set ofCtRoles for which children have changed from `currentElement` since thisChangeCollectorwas attached Warning: change in IMPLICIT are ignoredChangeCollector.getDirectChanges(CtElement currentElement)protected voidCalled whenever anything changes in the spoon modelprotected voidvoidActionBasedChangeListenerImpl.onListAdd(CtElement currentElement, CtRole role, List field, int index, CtElement newValue)voidActionBasedChangeListenerImpl.onListAdd(CtElement currentElement, CtRole role, List field, CtElement newValue)voidEmptyModelChangeListener.onListAdd(CtElement currentElement, CtRole role, List field, int index, CtElement newValue)voidEmptyModelChangeListener.onListAdd(CtElement currentElement, CtRole role, List field, CtElement newValue)voidFineModelChangeListener.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 nodevoidFineModelChangeListener.onListAdd(CtElement currentElement, CtRole role, List field, CtElement newValue)a newValue is appended to the list corresponding to the role in the AST nodevoidActionBasedChangeListenerImpl.onListDelete(CtElement currentElement, CtRole role, List field, int index, CtElement oldValue)voidActionBasedChangeListenerImpl.onListDelete(CtElement currentElement, CtRole role, List field, Collection<? extends CtElement> oldValue)voidEmptyModelChangeListener.onListDelete(CtElement currentElement, CtRole role, List field, int index, CtElement oldValue)voidEmptyModelChangeListener.onListDelete(CtElement currentElement, CtRole role, List field, Collection<? extends CtElement> oldValue)voidFineModelChangeListener.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 nodevoidFineModelChangeListener.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 nodevoidActionBasedChangeListenerImpl.onListDeleteAll(CtElement currentElement, CtRole role, List field, List oldValue)voidEmptyModelChangeListener.onListDeleteAll(CtElement currentElement, CtRole role, List field, List oldValue)voidFineModelChangeListener.onListDeleteAll(CtElement currentElement, CtRole role, List field, List oldValue)a list corresponding to the role in the AST node is emptied<K, V> voidActionBasedChangeListenerImpl.onMapAdd(CtElement currentElement, CtRole role, Map<K,V> field, K key, CtElement newValue)<K, V> voidEmptyModelChangeListener.onMapAdd(CtElement currentElement, CtRole role, Map<K,V> field, K key, CtElement newValue)<K, V> voidFineModelChangeListener.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> voidActionBasedChangeListenerImpl.onMapDelete(CtElement currentElement, CtRole role, Map<K,V> field, K key, CtElement oldValue)<K, V> voidEmptyModelChangeListener.onMapDelete(CtElement currentElement, CtRole role, Map<K,V> field, K key, CtElement oldValue)<K, V> voidFineModelChangeListener.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> voidActionBasedChangeListenerImpl.onMapDeleteAll(CtElement currentElement, CtRole role, Map<K,V> field, Map<K,V> oldValue)<K, V> voidEmptyModelChangeListener.onMapDeleteAll(CtElement currentElement, CtRole role, Map<K,V> field, Map<K,V> oldValue)<K, V> voidFineModelChangeListener.onMapDeleteAll(CtElement currentElement, CtRole role, Map<K,V> field, Map<K,V> oldValue)a map corresponding to the role in the AST node is emptiedvoidActionBasedChangeListenerImpl.onObjectDelete(CtElement currentElement, CtRole role, CtElement oldValue)voidEmptyModelChangeListener.onObjectDelete(CtElement currentElement, CtRole role, CtElement oldValue)voidFineModelChangeListener.onObjectDelete(CtElement currentElement, CtRole role, CtElement oldValue)a field corresponding to the role is being set to nullvoidActionBasedChangeListenerImpl.onObjectUpdate(CtElement currentElement, CtRole role, Object newValue, Object oldValue)voidActionBasedChangeListenerImpl.onObjectUpdate(CtElement currentElement, CtRole role, CtElement newValue, CtElement oldValue)voidEmptyModelChangeListener.onObjectUpdate(CtElement currentElement, CtRole role, Object newValue, Object oldValue)voidEmptyModelChangeListener.onObjectUpdate(CtElement currentElement, CtRole role, CtElement newValue, CtElement oldValue)voidFineModelChangeListener.onObjectUpdate(CtElement currentElement, CtRole role, Object newValue, Object oldValue)a field corresponding to the role is being set in the AST nodevoidFineModelChangeListener.onObjectUpdate(CtElement currentElement, CtRole role, CtElement newValue, CtElement oldValue)a field corresponding to the role is being set in the AST nodevoidActionBasedChangeListenerImpl.onSetAdd(CtElement currentElement, CtRole role, Set field, CtElement newValue)<T extends Enum>
voidActionBasedChangeListenerImpl.onSetAdd(CtElement currentElement, CtRole role, Set field, T newValue)voidEmptyModelChangeListener.onSetAdd(CtElement currentElement, CtRole role, Set field, CtElement newValue)<T extends Enum>
voidvoidFineModelChangeListener.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 nodevoidActionBasedChangeListenerImpl.onSetDelete(CtElement currentElement, CtRole role, Set field, Collection<ModifierKind> oldValue)voidActionBasedChangeListenerImpl.onSetDelete(CtElement currentElement, CtRole role, Set field, CtElement oldValue)voidActionBasedChangeListenerImpl.onSetDelete(CtElement currentElement, CtRole role, Set field, ModifierKind oldValue)voidEmptyModelChangeListener.onSetDelete(CtElement currentElement, CtRole role, Set field, Collection<ModifierKind> oldValue)voidEmptyModelChangeListener.onSetDelete(CtElement currentElement, CtRole role, Set field, CtElement oldValue)voidEmptyModelChangeListener.onSetDelete(CtElement currentElement, CtRole role, Set field, ModifierKind oldValue)voidFineModelChangeListener.onSetDelete(CtElement currentElement, CtRole role, Set field, Collection<ModifierKind> oldValue)an oldValue is deleted in the set corresponding to the role in the AST nodevoidFineModelChangeListener.onSetDelete(CtElement currentElement, CtRole role, Set field, CtElement oldValue)an oldValue is deleted in the set corresponding to the role in the AST nodevoidFineModelChangeListener.onSetDelete(CtElement currentElement, CtRole role, Set field, ModifierKind oldValue)an oldValue is deleted in the set corresponding to the role in the AST nodevoidActionBasedChangeListenerImpl.onSetDeleteAll(CtElement currentElement, CtRole role, Set field, Set oldValue)voidEmptyModelChangeListener.onSetDeleteAll(CtElement currentElement, CtRole role, Set field, Set oldValue)voidFineModelChangeListener.onSetDeleteAll(CtElement currentElement, CtRole role, Set field, Set oldValue)a set corresponding to the role in the AST node is emptiedMethod parameters in spoon.support.modelobs with type arguments of type CtElementModifier and TypeMethodDescriptionvoidActionBasedChangeListenerImpl.onListDelete(CtElement currentElement, CtRole role, List field, Collection<? extends CtElement> oldValue)voidEmptyModelChangeListener.onListDelete(CtElement currentElement, CtRole role, List field, Collection<? extends CtElement> oldValue)voidFineModelChangeListener.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
Methods in spoon.support.modelobs.context that return CtElementConstructors in spoon.support.modelobs.context with parameters of type CtElementModifierConstructorDescriptionCollectionContext(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
Constructors in spoon.support.reflect with parameters of type CtElement -
Uses of CtElement in spoon.support.reflect.code
Classes in spoon.support.reflect.code that implement CtElementModifier and TypeClassDescriptionclassclassCtArrayAccessImpl<T,V extends CtExpression<?>>classclassclassCtAssertImpl<T>classCtAssignmentImpl<T,A extends T>classclassCtBlockImpl<R>classclassCtCaseImpl<E>classclassclassclassclassclassclassclassclassclassclassCtExecutableReferenceExpressionImpl<T,E extends CtExpression<?>>classclassclassclassclassclassclassclassclassclassclassCtLambdaImpl<T>classclassclassclassclassclassCtOperatorAssignmentImpl<T,A extends T>classCtReturnImpl<R>classclassclassclassCtSwitchExpressionImpl<T,S>classCtSwitchImpl<S>classclassCtTargetedExpressionImpl<E,T extends CtExpression<?>>classclassclassclassclassclassclassclassclassclassclassclassclassCtYieldStatementImplMethods in spoon.support.reflect.code with type parameters of type CtElementModifier and TypeMethodDescription<E extends CtElement>
ECtTypeAccessImpl.setImplicit(boolean implicit)<E extends CtElement>
E<E extends CtElement>
ECtStatementListImpl.setPosition(SourcePosition position)Methods in spoon.support.reflect.code with parameters of type CtElement -
Uses of CtElement in spoon.support.reflect.cu
Classes in spoon.support.reflect.cu that implement CtElement -
Uses of CtElement in spoon.support.reflect.declaration
Classes in spoon.support.reflect.declaration that implement CtElementModifier and TypeClassDescriptionclassCtAnnotationImpl<A extends Annotation>The implementation forCtAnnotation.classThe implementation forCtAnnotationMethod.classCtAnnotationTypeImpl<T extends Annotation>The implementation forCtAnnotationType.classclassCtClassImpl<T>The implementation forCtClass.classImplements a compilation unit.classclassContains the default implementation of most CtElement methods.classCtEnumImpl<T extends Enum<?>>classclassThe implementation forCtExecutable.classCtFieldImpl<T>The implementation forCtField.classclassclassCtMethodImpl<T>The implementation forCtMethod.classclassclassclassclassclassThe implementation forCtPackage.classThe implementation forCtParameter.classclassclassclassCtTypeImpl<T>The implementation forCtType.classclassclassThis class is used to represent the constructor of an array when calling with an expression likeFields in spoon.support.reflect.declaration declared as CtElementMethods in spoon.support.reflect.declaration with type parameters of type CtElementModifier 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)Methods in spoon.support.reflect.declaration that return CtElementModifier and TypeMethodDescriptionCtElementImpl.clone()CtAnnotationImpl.getAnnotatedElement()CtCompilationUnitImpl.getParent()CtElementImpl.getParent()CtModuleImpl.getParent()Methods in spoon.support.reflect.declaration that return types with arguments of type CtElementModifier and TypeMethodDescriptionCtElementImpl.asIterable()CtElementImpl.descendantIterator()CtElementImpl.getDirectChildren()Methods in spoon.support.reflect.declaration with parameters of type CtElement -
Uses of CtElement in spoon.support.reflect.eval
Methods in spoon.support.reflect.eval with type parameters of type CtElementModifier and TypeMethodDescription<R extends CtElement>
RVisitorPartialEvaluator.evaluate(R element)Methods in spoon.support.reflect.eval with parameters of type CtElementModifier and TypeMethodDescriptionstatic ObjectEvalHelper.convertElementToRuntimeObject(CtElement value)Evaluates and converts CtExpression to their equivalent runtime objects eg "CtLiteral(3) + CtLiteral(4)" -> 7protected voidprotected void -
Uses of CtElement in spoon.support.reflect.reference
Classes in spoon.support.reflect.reference that implement CtElementModifier and TypeClassDescriptionclassclassclassclassclassclassAn implementation forCtLocalVariableReference.classclassclassclassclassThis 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.*;classclassclassrepresents a reference to an unbound field (used when no full classpath is availableclassclassMethods in spoon.support.reflect.reference with type parameters of type CtElementModifier 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
Methods in spoon.support.sniper with parameters of type CtElementModifier and TypeMethodDescriptionstatic booleanSniperJavaPrettyPrinter.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 wheneverDefaultJavaPrettyPrinterscans/prints an element Warning: DO not call on a cloned element. -
Uses of CtElement in spoon.support.sniper.internal
Fields in spoon.support.sniper.internal declared as CtElementMethods in spoon.support.sniper.internal with parameters of type CtElementModifier and TypeMethodDescriptionstatic ElementSourceFragmentElementSourceFragment.createSourceFragmentsFrom(CtElement element)Builds a tree of source fragments for `element` and all its children, based on the source positions of each elementConstructors in spoon.support.sniper.internal with parameters of type CtElementModifierConstructorDescriptionChangeResolver(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
Classes in spoon.support.util with type parameters of type CtElementModifier and TypeClassDescriptionclassThe implementation of theList, which is used by Spoon model objects.classDeprecated.This set is no longer actively used or maintained.classQualifiedNameBasedSortedSet<E extends CtElement>The set properties of this set are based on the qualified name of the element inserted.Methods in spoon.support.util that return CtElementModifier and TypeMethodDescriptionprotected abstract CtElementModelList.getOwner()protected abstract CtElementModelSet.getOwner()Deprecated.Constructor parameters in spoon.support.util with type arguments of type CtElementModifierConstructorDescriptionprotectedModelSet(Comparator<? super CtElement> comparator)Deprecated. -
Uses of CtElement in spoon.support.util.internal
Classes in spoon.support.util.internal with type parameters of type CtElementModifier and TypeClassDescriptionclassElementNameMap<T extends CtElement>This class is for internal use only.Methods in spoon.support.util.internal that return CtElementMethods in spoon.support.util.internal with parameters of type CtElementModifier and TypeMethodDescriptionstatic voidModelCollectionUtils.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
Methods in spoon.support.visitor with parameters of type CtElement -
Uses of CtElement in spoon.support.visitor.clone
Methods in spoon.support.visitor.clone with type parameters of type CtElementModifier and TypeMethodDescriptionstatic <T extends CtElement>
TCloneBuilder.build(CloneBuilder builder, CtElement element, CtElement other)<T extends CtElement>
TCloneVisitor.getClone()Methods in spoon.support.visitor.clone with parameters of type CtElementModifier and TypeMethodDescriptionstatic <T extends CtElement>
TCloneBuilder.build(CloneBuilder builder, CtElement element, CtElement other)voidvoidCloneBuilder.scanCtElement(CtElement e)Scans an abstract element.void -
Uses of CtElement in spoon.support.visitor.equals
Fields in spoon.support.visitor.equals declared as CtElementMethods in spoon.support.visitor.equals with type parameters of type CtElementModifier 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)Methods in spoon.support.visitor.equals with parameters of type CtElementModifier and TypeMethodDescriptionvoidvoidbooleanEqualsVisitor.checkEquals(CtElement element, CtElement other)protected voidstatic booleanvoidvoidIs called byCloneVisitorat the end of the cloning for each element.Method parameters in spoon.support.visitor.equals with type arguments of type CtElementModifier and TypeMethodDescriptionprotected voidEqualsVisitor.biScan(CtRole role, Collection<? extends CtElement> elements, Collection<? extends CtElement> others) -
Uses of CtElement in spoon.support.visitor.replace
Classes in spoon.support.visitor.replace with type parameters of type CtElementModifier and TypeInterfaceDescriptioninterfaceReplaceListener<T extends CtElement>Interface for the AST node replacement infrastructure.Methods in spoon.support.visitor.replace with type parameters of type CtElementModifier and TypeMethodDescriptionstatic <E extends CtElement>
voidReplacementVisitor.replace(CtElement original, Collection<E> replaces)Methods in spoon.support.visitor.replace with parameters of type CtElement -
Uses of CtElement in spoon.template
Classes in spoon.template with type parameters of type CtElementModifier and TypeClassDescriptionclassAbstractTemplate<T extends CtElement>handles the well-formedness and helper methods of templatesinterfaceA template code is simply a piece of code that uses aTemplateParameter's instance.Methods in spoon.template with type parameters of type CtElementModifier 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.Methods in spoon.template with parameters of type CtElementModifier and TypeMethodDescriptionFinds all target program sub-trees that correspond to a template.voidTemplateMatcher.forEachMatch(CtElement rootElement, CtConsumer<Match> consumer)Finds all target program sub-trees that correspond to a template and calls consumer.accept(matchingElement, )booleanstatic voidSubstitution.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.Constructors in spoon.template with parameters of type CtElementModifierConstructorDescriptionTemplateMatcher(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
Methods in spoon.testing with parameters of type CtElementModifier and TypeMethodDescriptionstatic AbstractCtElementAssert<?>Assert.assertThat(CtElement actual)Create a new instance of.CtElementAssertVerifies that the actual value is equal to the given one.Constructors in spoon.testing with parameters of type CtElementModifierConstructorDescriptionprotectedAbstractCtElementAssert(CtElement actual, Class<?> selfType)protectedCtElementAssert(CtElement actual) -
Uses of CtElement in spoon.testing.utils
Methods in spoon.testing.utils with type parameters of type CtElementModifier and TypeMethodDescriptionCheck.assertIsSame(A actual, E expected)Check.assertIsSame(A actual, E expected)Methods in spoon.testing.utils with parameters of type CtElementModifier and TypeMethodDescriptionstatic voidCheck.assertCtElementEquals(CtElement ct1, CtElement ct2)if ct1 is not equals to ct2, tells the exact difference