jfun.jaskell.ast
Class FunBinding

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

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


getLocation

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


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()
Overrides:
toString in class java.lang.Object