Top Fields Constructors Methods
org.python.indexer.ast

public Class NName

extends NNode
Class Inheritance
Imports
org.python.indexer.Indexer, .NBinding, .Scope, org.python.indexer.types.NType, .NUnknownType

Field Summary

Modifier and TypeField and Description
public final String
pack-priv static final long
Inherited from org.python.indexer.ast.NNode:
parent

Constructor Summary

AccessConstructor and Description
public
public
NName(String id, int start, int end)

Method Summary

Modifier and TypeMethod and Description
public boolean
isAttribute()

Returns true if this name node is the attr child (i.e. the attribute being accessed) of an NAttribute node.

public boolean
isCall()

Overrides org.python.indexer.ast.NNode.isCall.

Returns true if this name is structurally in a call position.

private NBinding
makeTempBinding(Scope s)

Create a temporary binding and definition for this name.

public NType
resolve(Scope s)

Overrides org.python.indexer.ast.NNode.resolve.

Node should set the resolved type in its type field and also return it.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
visit(NNodeVisitor
the object to call with this node. If the visitor returns true, the node also passes its children to the visitor.
v
)

Implements abstract org.python.indexer.ast.NNode.visit.

Visits this node and optionally its children.

Inherited from org.python.indexer.ast.NNode:
addChildrenaddChildrenaddErroraddErroraddTypeaddWarningaddWarningbindNamesbindsNameendgetAstRootgetDeepestNodeAtOffsetgetEnclosingNamespacegetFilegetParentgetTablegetTypeisClassDefisFunctionDefisLambdaisModuleisNamelengthresolveExprresolveListresolveListAsUnionsetEndsetParentsetStartsetTypestartvisitNodevisitNodeList

Field Detail

idback to summary
public final String id
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides org.python.indexer.ast.NNode.serialVersionUID.

Constructor Detail

NNameback to summary
public NName(String id)
NNameback to summary
public NName(String id, int start, int end)

Method Detail

isAttributeback to summary
public boolean isAttribute()

Returns true if this name node is the attr child (i.e. the attribute being accessed) of an NAttribute node.

isCallback to summary
public boolean isCall()

Overrides org.python.indexer.ast.NNode.isCall.

Returns true if this name is structurally in a call position.

makeTempBindingback to summary
private NBinding makeTempBinding(Scope s)

Create a temporary binding and definition for this name. If we later encounter a true definition we'll remove this node from the defs and add it to the refs.

resolveback to summary
public NType resolve(Scope s) throws Exception

Overrides org.python.indexer.ast.NNode.resolve.

Doc from org.python.indexer.ast.NNode.resolve.

Node should set the resolved type in its type field and also return it.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
visitback to summary
public void visit(NNodeVisitor v)

Implements abstract org.python.indexer.ast.NNode.visit.

Doc from org.python.indexer.ast.NNode.visit.

Visits this node and optionally its children.

Parameters
v:NNodeVisitor

the object to call with this node. If the visitor returns true, the node also passes its children to the visitor.

Annotations
@Override