Top Description Fields Constructors Methods
org.jruby.ast

public abstract Class MethodDefNode

extends Node
implements INameNode, DefNode
Class Inheritance
All Implemented Interfaces
org.jruby.ast.DefNode, org.jruby.ast.types.INameNode
Known Direct Subclasses
org.jruby.ast.DefnNode, org.jruby.ast.DefsNode
Imports
org.jruby.RubySymbol, org.jruby.ast.types.INameNode, org.jruby.parser.StaticScope

Base class for DefnNode and DefsNode

Field Summary

Modifier and TypeField and Description
protected final ArgsNode
protected final Node
protected boolean
protected final int
protected final RubySymbol
protected final StaticScope
Inherited from org.jruby.ast.Node:
containsVariableAssignmentEMPTY_LISTnewline

Constructor Summary

AccessConstructor and Description
public
MethodDefNode(int line, RubySymbol name, ArgsNode argsNode, StaticScope scope, Node bodyNode, int endLine)

Method Summary

Modifier and TypeMethod and Description
public boolean
public ArgsNode

Returns:

Returns a Node
getArgsNode
()

Implements org.jruby.ast.DefNode.getArgsNode.

Gets the argsNode.

public Node

Returns:

the contents
getBodyNode
()

Implements org.jruby.ast.DefNode.getBodyNode.

Gets the body of this class.

public int

Returns:

the zero-based line number
getEndLine
()

Implements org.jruby.ast.DefNode.getEndLine.

Which line is the 'end' encountered on.

public RubySymbol

Returns:

Returns a String
getName
()

Implements org.jruby.ast.types.INameNode.getName.

Gets the name.

public StaticScope

Returns:

the scoping info
getScope
()

Implements org.jruby.ast.DefNode.getScope.

Get the static scoping information.

public void
Inherited from org.jruby.ast.Node:
acceptchildNodescontainsVariableAssignmentcreateListcreateListcreateListcreateListexecutesOncegetFilegetLinegetNodeNamegetNodeTypeisNewlineisNilneedsDefinitionChecksetLinesetNewlinetoStringtoStringtoStringExtraInfotoStringInternalunsetNewline

Field Detail

argsNodeback to summary
protected final ArgsNode argsNode
bodyNodeback to summary
protected final Node bodyNode
containsNextBreakback to summary
protected boolean containsNextBreak
endLineback to summary
protected final int endLine
nameback to summary
protected final RubySymbol name
scopeback to summary
protected final StaticScope scope

Constructor Detail

MethodDefNodeback to summary
public MethodDefNode(int line, RubySymbol name, ArgsNode argsNode, StaticScope scope, Node bodyNode, int endLine)

Method Detail

containsBreakNextback to summary
public boolean containsBreakNext()
getArgsNodeback to summary
public ArgsNode getArgsNode()

Implements org.jruby.ast.DefNode.getArgsNode.

Gets the argsNode.

Returns:ArgsNode

Returns a Node

getBodyNodeback to summary
public Node getBodyNode()

Implements org.jruby.ast.DefNode.getBodyNode.

Gets the body of this class.

Returns:Node

the contents

getEndLineback to summary
public int getEndLine()

Implements org.jruby.ast.DefNode.getEndLine.

Which line is the 'end' encountered on. Useful for RETURN event generation.

Returns:int

the zero-based line number

getNameback to summary
public RubySymbol getName()

Implements org.jruby.ast.types.INameNode.getName.

Gets the name.

Returns:RubySymbol

Returns a String

getScopeback to summary
public StaticScope getScope()

Implements org.jruby.ast.DefNode.getScope.

Get the static scoping information.

Returns:StaticScope

the scoping info

setContainsNextBreakback to summary
public void setContainsNextBreak()