Package org.jruby.ast
Class MethodDefNode
java.lang.Object
org.jruby.ast.Node
org.jruby.ast.MethodDefNode
Base class for DefnNode and DefsNode
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ArgsNode
protected final Node
protected boolean
protected final int
protected final RubySymbol
protected final StaticScope
Fields inherited from class org.jruby.ast.Node
containsVariableAssignment, newline
-
Constructor Summary
ConstructorsConstructorDescriptionMethodDefNode
(int line, RubySymbol name, ArgsNode argsNode, StaticScope scope, Node bodyNode, int endLine) -
Method Summary
Methods inherited from class org.jruby.ast.Node
accept, childNodes, containsVariableAssignment, createList, createList, createList, createList, executesOnce, getFile, getLine, getNodeName, getNodeType, isNewline, isNil, needsDefinitionCheck, setLine, setNewline, toString, toString, toStringExtraInfo, toStringInternal, unsetNewline
-
Field Details
-
name
-
argsNode
-
scope
-
bodyNode
-
endLine
protected final int endLine -
containsNextBreak
protected boolean containsNextBreak
-
-
Constructor Details
-
MethodDefNode
public MethodDefNode(int line, RubySymbol name, ArgsNode argsNode, StaticScope scope, Node bodyNode, int endLine)
-
-
Method Details
-
getArgsNode
Gets the argsNode.- Specified by:
getArgsNode
in interfaceDefNode
- Returns:
- Returns a Node
-
getScope
Get the static scoping information. -
getBodyNode
Gets the body of this class.- Specified by:
getBodyNode
in interfaceDefNode
- Returns:
- the contents
-
getName
Gets the name. -
getEndLine
public int getEndLine()Which line is the 'end' encountered on. Useful for RETURN event generation.- Specified by:
getEndLine
in interfaceDefNode
- Returns:
- the zero-based line number
-
setContainsNextBreak
public void setContainsNextBreak() -
containsBreakNext
public boolean containsBreakNext()
-