jfun.jaskell.ast
Class FunDef

java.lang.Object
  extended by jfun.jaskell.ast.FunDef
All Implemented Interfaces:
java.io.Serializable

public final class FunDef
extends java.lang.Object
implements 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()
Get the starting index in the original source.


getLocation

public Location getLocation()
Get the location that is readable to human being.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object