org.python.indexer.ast
Class NFunctionDef
- java.lang.Object
-
- org.python.indexer.ast.NNode
-
- org.python.indexer.ast.NFunctionDef
-
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- NLambda
public class NFunctionDef extends NNode
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description java.util.List<NNode>argsNNodebodyjava.util.List<NNode>defaultsNNamekwargsNNamenameNNamevarargs
-
Constructor Summary
Constructors Constructor and Description NFunctionDef(NName name, java.util.List<NNode> args, NBlock body, java.util.List<NNode> defaults, NName varargs, NName kwargs)NFunctionDef(NName name, java.util.List<NNode> args, NBlock body, java.util.List<NNode> defaults, NName varargs, NName kwargs, int start, int end)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanbindsName()Returnstrueif this is a name-binding node.java.util.List<NNode>getDecoratorList()booleanisFunctionDef()NTyperesolve(Scope outer)Node should set the resolved type in itsNNode.typefield and also return it.voidsetDecoratorList(java.util.List<NNode> decoratorList)java.lang.StringtoString()voidvisit(NNodeVisitor v)Visits this node and optionally its children.-
Methods inherited from class org.python.indexer.ast.NNode
addChildren, addChildren, addType, end, getAstRoot, getDeepestNodeAtOffset, getEnclosingNamespace, getFile, getParent, getTable, getType, isCall, isClassDef, isLambda, isModule, isName, length, resolveExpr, setEnd, setParent, setStart, setType, start
-
-
-
-
Field Detail
-
name
public NName name
-
args
public java.util.List<NNode> args
-
defaults
public java.util.List<NNode> defaults
-
varargs
public NName varargs
-
kwargs
public NName kwargs
-
body
public NNode body
-
-
Constructor Detail
-
NFunctionDef
public NFunctionDef(NName name, java.util.List<NNode> args, NBlock body, java.util.List<NNode> defaults, NName varargs, NName kwargs)
-
-
Method Detail
-
setDecoratorList
public void setDecoratorList(java.util.List<NNode> decoratorList)
-
getDecoratorList
public java.util.List<NNode> getDecoratorList()
-
isFunctionDef
public boolean isFunctionDef()
- Overrides:
isFunctionDefin classNNode
-
bindsName
public boolean bindsName()
Description copied from class:NNodeReturnstrueif this is a name-binding node. Includes functions/lambdas, function/lambda params, classes, assignments, imports, and implicit assignment via for statements and except clauses.
-
resolve
public NType resolve(Scope outer) throws java.lang.Exception
Description copied from class:NNodeNode should set the resolved type in itsNNode.typefield and also return it.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
visit
public void visit(NNodeVisitor v)
Description copied from class:NNodeVisits this node and optionally its children.
-
-
DMelt 3.0 © DataMelt by jWork.ORG