net.sf.jga.parser
Class BinaryFunctorRef

java.lang.Object
  extended by net.sf.jga.parser.BinaryFunctorRef
All Implemented Interfaces:
FunctorRef

public class BinaryFunctorRef
extends java.lang.Object
implements FunctorRef

Contains and describes a BinaryFunctor being built by the functor parser.

Copyright © 2004 David A. Hall

Author:
David A. Hall

Field Summary
 
Fields inherited from interface net.sf.jga.parser.FunctorRef
BINARY_FN, CONSTANT, GENERATOR, IDENTITY, UNARY_FN
 
Constructor Summary
BinaryFunctorRef(BinaryFunctor bf, java.lang.Class arg1Type, java.lang.Class arg2Type, java.lang.Class returnType)
           
 
Method Summary
 java.lang.String getArgName(int i)
          returns the name of the i'th argument to the current functor, as described in the expression being parsed.
 java.lang.Class getArgType(int i)
          returns the type of the i'th argument to the current functor.
 BinaryFunctor getFunctor()
           
 int getNumberArgs()
          returns the number of arguments that the current functor requires.
 int getReferenceType()
          returns a value that classifies the functor by the number of arguments that it requires.
 java.lang.Class getReturnType()
          returns the type of objects that the current functor returns.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BinaryFunctorRef

public BinaryFunctorRef(BinaryFunctor bf,
                        java.lang.Class arg1Type,
                        java.lang.Class arg2Type,
                        java.lang.Class returnType)
Method Detail

getFunctor

public BinaryFunctor getFunctor()

getReturnType

public java.lang.Class getReturnType()
Description copied from interface: FunctorRef
returns the type of objects that the current functor returns.

Specified by:
getReturnType in interface FunctorRef

getNumberArgs

public int getNumberArgs()
Description copied from interface: FunctorRef
returns the number of arguments that the current functor requires. Currently, the implementations tend to be hard coded.

Specified by:
getNumberArgs in interface FunctorRef

getArgType

public java.lang.Class getArgType(int i)
Description copied from interface: FunctorRef
returns the type of the i'th argument to the current functor.

Specified by:
getArgType in interface FunctorRef

getArgName

public java.lang.String getArgName(int i)
Description copied from interface: FunctorRef
returns the name of the i'th argument to the current functor, as described in the expression being parsed.

Specified by:
getArgName in interface FunctorRef

getReferenceType

public int getReferenceType()
Description copied from interface: FunctorRef
returns a value that classifies the functor by the number of arguments that it requires.

Specified by:
getReferenceType in interface FunctorRef

toString

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


Copyright © 2002-2005 David A. Hall. All Rights Reserved.