public class NAttribute extends NNode
Constructor and Description |
---|
NAttribute(NNode target,
NName attr) |
NAttribute(NNode target,
NName attr,
int start,
int end) |
Modifier and Type | Method and Description |
---|---|
NName |
getAttr() |
java.lang.String |
getAttributeName() |
NNode |
getTarget() |
NType |
resolve(Scope s)
Node should set the resolved type in its
NNode.type field
and also return it. |
void |
setAttr(NName attr)
Sets the attribute node.
|
void |
setAttr(Scope s,
NType v)
Assign some definite value to the attribute.
|
void |
setTarget(NNode target)
Sets the target node.
|
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 java.lang.String getAttributeName()
public void setAttr(NName attr)
java.lang.IllegalArgumentException
- if the param is nullpublic NName getAttr()
public void setTarget(NNode target)
java.lang.IllegalArgumentException
- if the param is nullpublic NNode getTarget()
public void setAttr(Scope s, NType v) throws java.lang.Exception
resolve(org.python.indexer.Scope)
.java.lang.Exception
public NType resolve(Scope s) throws java.lang.Exception
NNode
NNode.type
field
and also return it.public java.lang.String toString()
toString
in class java.lang.Object
public void visit(NNodeVisitor v)
NNode