Package spoon.reflect.visitor
This package defines visitor, scanner, and scanner-based query API for Java programs reified in the meta-model.
Related Documentation
-
Interface Summary Interface Description CtImportVisitor This interface defines the visitor for the different types of CtImportCtVisitable Define a visitable element in spoon.CtVisitor This interface defines the visitor for the Spoon metamodel, as defined inspoon.reflect.declaration
,spoon.reflect.code
, andspoon.reflect.reference
.Filter<T extends CtElement> This interface defines a filter for program elements.ImportScanner Used to compute the imports required to write readable code with no fully qualified names.LexicalScope Represents that a lexical scope in the language Note that scopes are changing after variable declaration.PrettyPrinter This interface defines the pretty printers.TokenWriter Responsible for writing a token while pretty-printing. -
Class Summary Class Description AccessibleVariablesFinder Find local variables catch, parameters, fields, super fieldsAstParentConsistencyChecker CacheBasedConflictFinder Caches some field and nested type namesCommentHelper Computes source code representation of the Comment literalCtAbstractBiScanner Defines the core bi-scan responsibility.CtAbstractImportVisitor Provides an empty implementation ofCtImportVisitor
.CtAbstractVisitor Provides an empty implementation of CtVIsitor.CtBFSIterator A class to be able to iterate over the children elements in the tree of a given node, in breadth-first order.CtBiScannerDefault This visitor implements a deep-search scan on the model for 2 elements.CtDequeScanner This class defines a scanner that maintains a scanning stack for contextual awareness.CtInheritanceScanner This class provides an abstract implementation of the visitor that allows its subclasses to scan the metamodel elements by recursively using their (abstract) supertype scanning methods.CtIterator A class to be able to iterate over the children elements in the tree of a given node, in depth-first order.CtScanner This visitor implements a deep-search scan on the model.DefaultImportComparator Defines order of imports: 1) imports are ordered alphabetically 2) static imports are lastDefaultJavaPrettyPrinter A visitor for generating Java code from the program compile-time model.DefaultTokenWriter Implementation ofTokenWriter
, which writes all tokens toPrinterHelper
EarlyTerminatingScanner<T> ExtendsCtScanner
, to support early termination of scanning process and scan listeners.ElementPrinterHelper ForceFullyQualifiedProcessor Forces fully qualified identifiers by making many elements explicit (by calling setImplicit(false)).ForceImportProcessor Marks all types references as implicit so all types will get imported.ImportCleaner Updates list of import statements of compilation unit followingCtElement.isImplicit()
.ImportConflictDetector Detects conflicts needed to be required be a fully-qualified name.ImportScannerImpl A scanner that calculates the imports for a given model.LexicalScopeScanner ACtScanner
which provides current lexical scope of currently scanned AST node.ListPrinter Helper which assures consistent printing of lists prefixed with `start`, separated by `separator` and suffixed by `end`.
If there is no item in the list then it prints `start` and then `end`
If there is one item in the list then it prints `start`, item and then `end`
If there is more then one items in the list then it prints `start`, items separated by `separator` and then `end`ModelConsistencyChecker This scanner checks that a program model is consistent with regards to the parent elements (children must have the right parent).PrinterHelper Supports configurable printing of text with indentations and line and column countingPrintingContext Query This class provides some useful methods to retrieve program elements and reference through aCtScanner
-based deep search. -
Enum Summary Enum Description JavaIdentifiers This enum defines the Java keywords and some helper method to determine if some strings are Java identifiers. -
Annotation Types Summary Annotation Type Description Child This annotation defines a method that contains children of an element of the meta model.Parent This annotation defines a method that returns the parent of an element of the meta model.Root This annotation defines an element as Root of the meta model.