public class NAlias extends NNode
Modifier and Type | Field and Description |
---|---|
NName |
aname
The alias name, if an "as" clause was specified.
|
java.lang.String |
name
The un-parsed qname or simple name corresponding to
qname . |
NQname |
qname
Represents one of three possibilities:
import stmt: qname of one of the imported modules
import-from stmt: qname of the referenced module
import-from stmt: simple name imported from referenced module
|
Constructor and Description |
---|
NAlias(java.lang.String name,
NQname qname,
NName aname) |
NAlias(java.lang.String name,
NQname qname,
NName aname,
int start,
int end) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBoundName()
Returns the alias, if non-
null , else the simple name. |
NType |
resolve(Scope s)
Resolves and returns the referenced
NModuleType in an import or
or import-from statement. |
java.lang.String |
toString() |
void |
visit(NNodeVisitor v)
Visits this node and optionally its children.
|
addChildren, addChildren, addError, addError, addType, addWarning, addWarning, bindNames, bindsName, end, getAstRoot, getDeepestNodeAtOffset, getEnclosingNamespace, getFile, getParent, getTable, getType, isCall, isClassDef, isFunctionDef, isLambda, isModule, isName, length, resolveExpr, resolveList, resolveListAsUnion, setEnd, setParent, setStart, setType, start, visitNode, visitNodeList
public NQname qname
public java.lang.String name
qname
.public NName aname
public java.lang.String getBoundName()
null
, else the simple name.public NType resolve(Scope s) throws java.lang.Exception
NModuleType
in an import or
or import-from statement. NImportFrom statements manually
resolve their child NAliases.public java.lang.String toString()
toString
in class java.lang.Object
public void visit(NNodeVisitor v)
NNode