Package org.jruby.ast

Class MethodDefNode

java.lang.Object
org.jruby.ast.Node
org.jruby.ast.MethodDefNode
All Implemented Interfaces:
DefNode, INameNode
Direct Known Subclasses:
DefnNode, DefsNode

public abstract class MethodDefNode extends Node implements INameNode, DefNode
Base class for DefnNode and DefsNode
  • Field Details

    • name

      protected final RubySymbol name
    • argsNode

      protected final ArgsNode argsNode
    • scope

      protected final StaticScope scope
    • bodyNode

      protected final Node bodyNode
    • endLine

      protected final int endLine
    • containsNextBreak

      protected boolean containsNextBreak
  • Constructor Details

  • Method Details

    • getArgsNode

      public ArgsNode getArgsNode()
      Gets the argsNode.
      Specified by:
      getArgsNode in interface DefNode
      Returns:
      Returns a Node
    • getScope

      public StaticScope getScope()
      Get the static scoping information.
      Specified by:
      getScope in interface DefNode
      Returns:
      the scoping info
    • getBodyNode

      public Node getBodyNode()
      Gets the body of this class.
      Specified by:
      getBodyNode in interface DefNode
      Returns:
      the contents
    • getName

      public RubySymbol getName()
      Gets the name.
      Specified by:
      getName in interface INameNode
      Returns:
      Returns a String
    • getEndLine

      public int getEndLine()
      Which line is the 'end' encountered on. Useful for RETURN event generation.
      Specified by:
      getEndLine in interface DefNode
      Returns:
      the zero-based line number
    • setContainsNextBreak

      public void setContainsNextBreak()
    • containsBreakNext

      public boolean containsBreakNext()