|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.teiid.language.visitor.AbstractLanguageVisitor
org.teiid.language.visitor.HierarchyVisitor
org.teiid.language.visitor.CollectorVisitor<T>
public class CollectorVisitor<T>
This visitor can be used to collect all objects of a certain type in a language tree. Each visit method does an instanceof method to check whether the object is of the expected type.
| Constructor Summary | |
|---|---|
CollectorVisitor(java.lang.Class<T> type)
|
|
| Method Summary | ||
|---|---|---|
static java.util.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 java.util.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 java.util.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
|
collectObjects(java.lang.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. |
|
java.util.Collection<T> |
getCollectedObjects()
|
|
void |
visitNode(LanguageObject obj)
Visit the ILanguageObject instance to perform the Visitor's operation on that instance. |
|
| Methods inherited from class org.teiid.language.visitor.HierarchyVisitor |
|---|
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 |
| Methods inherited from class org.teiid.language.visitor.AbstractLanguageVisitor |
|---|
visit, visit, visit, visit, visit, visit, visit, visitNodes, visitNodes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CollectorVisitor(java.lang.Class<T> type)
| Method Detail |
|---|
public void visitNode(LanguageObject obj)
AbstractLanguageVisitor
visitNode in class AbstractLanguageVisitorobj - an ILanguageObject instanceHierarchyVisitorpublic java.util.Collection<T> getCollectedObjects()
public static <T> java.util.Collection<T> collectObjects(java.lang.Class<T> type,
LanguageObject object)
type - Language object type to look forobject - Root of the language object tree
public static java.util.Collection<ColumnReference> collectElements(LanguageObject object)
type - Language object type to look forobject - Root of the language object tree
public static java.util.Collection<NamedTable> collectGroups(LanguageObject object)
type - Language object type to look forobject - Root of the language object tree
public static java.util.Set<NamedTable> collectGroupsUsedByElements(LanguageObject object)
type - Language object type to look forobject - Root of the language object tree
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||