jfun.jaskell.ast
Class FunDef

java.lang.Object
  extended byjfun.jaskell.ast.FunDef
All Implemented Interfaces:
jfun.jaskell.ast.Indexed, java.io.Serializable

public final class FunDef
extends java.lang.Object
implements jfun.jaskell.ast.Indexed, java.io.Serializable

Represents an uncompiled function definition.

Author:
Ben Yu Dec 7, 2004
See Also:
Serialized Form

Constructor Summary
FunDef(int from, java.lang.String name, Alternative[] alternatives)
          Create a FunDef object.
FunDef(int from, java.lang.String name, Alternative[] alternatives, Location loc)
          Create a FunDef object.
 
Method Summary
 Alternative[] getAlternatives()
          Get all the alternative definitions of this function.
 int getIndex()
          Get the starting index in the original source.
 Location getLocation()
          Get the location that is readable to human being.
 java.lang.String getName()
          Get the function name.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FunDef

public FunDef(int from,
              java.lang.String name,
              Alternative[] alternatives)
Create a FunDef object.

Parameters:
from - the index in the original source.
name - the name of this function.
alternatives - the alternative definitions.

FunDef

public FunDef(int from,
              java.lang.String name,
              Alternative[] alternatives,
              Location loc)
Create a FunDef object.

Parameters:
from - the index in the original source.
name - the name of this function.
alternatives - the alternative definitions.
loc - the location in the original source.
Method Detail

getAlternatives

public Alternative[] getAlternatives()
Get all the alternative definitions of this function.

Returns:
Returns the alternatives.

getName

public java.lang.String getName()
Get the function name.

Returns:
Returns the name.

getIndex

public int getIndex()
Description copied from interface: jfun.jaskell.ast.Indexed
Get the starting index in the original source.

Specified by:
getIndex in interface jfun.jaskell.ast.Indexed

getLocation

public Location getLocation()
Description copied from interface: jfun.jaskell.ast.Indexed
Get the location that is readable to human being.

Specified by:
getLocation in interface jfun.jaskell.ast.Indexed

toString

public java.lang.String toString()