jfun.jaskell.ast
Class FunBinding

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

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

Represents a compiled function definition.

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

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

Constructor Detail

FunBinding

public FunBinding(Binding name,
                  int pnum,
                  Alternative[] alternatives)
Create a FunBinding object.

Parameters:
name - the name of this function.
pnum - the number of parameters.
alternatives - the alternative definitions.

FunBinding

public FunBinding(Binding name,
                  int pnum,
                  Alternative[] alternatives,
                  Location loc)
Create a FunBinding object.

Parameters:
name - the name of this function.
pnum - the number of parameters.
alternatives - the alternative definitions.
loc - the location in the original source.
Method Detail

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

getParameterCount

public int getParameterCount()
Returns the number of parameters.


getAlternatives

public Alternative[] getAlternatives()
Returns the alternatives.


getName

public Binding getName()
Returns the name.


toString

public java.lang.String toString()