public class CollectorVisitor<T> extends HierarchyVisitor
| Modifier and Type | Field and Description |
|---|---|
protected Collection<T> |
objects |
protected Class<T> |
type |
| Constructor and Description |
|---|
CollectorVisitor(Class<T> type) |
| Modifier and Type | Method and Description |
|---|---|
static Collection<ColumnReference> |
collectElements(LanguageObject object)
This is a utility method for a common use of this visitor, which is to collect
all elements in an object tree.
|
static Collection<NamedTable> |
collectGroups(LanguageObject object)
This is a utility method for a common use of this visitor, which is to collect
all groups in an object tree.
|
static Set<NamedTable> |
collectGroupsUsedByElements(LanguageObject object)
This is a utility method for a common use of this visitor, which is to collect
all groups used by all elements in an object tree.
|
static <T> Collection<T> |
collectObjects(Class<T> type,
LanguageObject object)
This is a utility method to instantiate and run the visitor in conjunction
with a HierarchyVisitor to collect all objects of the specified type
of the specified tree in the language object tree.
|
Collection<T> |
getCollectedObjects() |
void |
visitNode(LanguageObject obj)
Visit the LanguageObject instance to perform the Visitor's operation on
that instance.
|
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitvisit, visit, visit, visit, visit, visit, visit, visitNodes, visitNodesprotected Collection<T> objects
public void visitNode(LanguageObject obj)
AbstractLanguageVisitorvisitNode in class AbstractLanguageVisitorobj - an LanguageObject instanceHierarchyVisitorpublic Collection<T> getCollectedObjects()
public static <T> Collection<T> collectObjects(Class<T> type, LanguageObject object)
type - Language object type to look forobject - Root of the language object treepublic static Collection<ColumnReference> collectElements(LanguageObject object)
type - Language object type to look forobject - Root of the language object treepublic static Collection<NamedTable> collectGroups(LanguageObject object)
type - Language object type to look forobject - Root of the language object treepublic static Set<NamedTable> collectGroupsUsedByElements(LanguageObject object)
type - Language object type to look forobject - Root of the language object treeCopyright © 2018 JBoss by Red Hat. All rights reserved.