public abstract class ListBasedScope extends AbstractScope
| Modifier and Type | Field and Description |
|---|---|
protected List<ScopeChild> |
children
Child namespaces in this scope
|
node, parent, scopeType| Modifier | Constructor and Description |
|---|---|
protected |
ListBasedScope(IScope parent,
TParseTreeNode node,
ScopeType scopeType) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(INamespace namespace,
String alias,
boolean nullable)
Default implementation: not supported (most scopes don't have children)
|
List<ScopeChild> |
getChildren()
Default implementation: empty list
|
List<INamespace> |
getVisibleNamespaces()
Default implementation: delegate to parent
|
void |
resolve(List<String> names,
INameMatcher matcher,
boolean deep,
IResolved resolved)
Default implementation: delegate to parent
|
protected void |
resolveInNamespace(INamespace namespace,
boolean nullable,
List<String> remainingNames,
INameMatcher matcher,
ResolvePath path,
IResolved resolved)
Resolve remaining name parts within a namespace.
|
INamespace |
resolveTable(String tableName)
Default implementation: delegate to parent
|
String |
toString() |
fullyQualify, getNode, getParent, getScopeType, isWithinprotected final List<ScopeChild> children
protected ListBasedScope(IScope parent, TParseTreeNode node, ScopeType scopeType)
public void addChild(INamespace namespace, String alias, boolean nullable)
AbstractScopeaddChild in interface IScopeaddChild in class AbstractScopenamespace - The namespace to addalias - The alias for this namespacenullable - Whether this namespace is nullable (e.g., RIGHT side of LEFT JOIN)public List<ScopeChild> getChildren()
AbstractScopegetChildren in interface IScopegetChildren in class AbstractScopepublic INamespace resolveTable(String tableName)
AbstractScoperesolveTable in interface IScoperesolveTable in class AbstractScopetableName - Table name or aliaspublic void resolve(List<String> names, INameMatcher matcher, boolean deep, IResolved resolved)
AbstractScoperesolve in interface IScoperesolve in class AbstractScopenames - Name parts (e.g., ["schema", "table", "column"])matcher - Name matcher for case sensitivity rulesdeep - Whether to recursively resolve into record fieldsresolved - Callback to collect all matchesprotected void resolveInNamespace(INamespace namespace, boolean nullable, List<String> remainingNames, INameMatcher matcher, ResolvePath path, IResolved resolved)
public List<INamespace> getVisibleNamespaces()
AbstractScopegetVisibleNamespaces in interface IScopegetVisibleNamespaces in class AbstractScopepublic String toString()
toString in class AbstractScope