|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FunctorRef<R,F extends Functor<R>>
Contains and describes a functor being built by the functor parser. Many of the parsing methods return and/or accept instances of this interface that describe a functor, describe its broad type, the number, names, and types of its arguments, and the type returned.
Copyright © 2004-2005 David A. Hall
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. |
F |
getFunctor()
Returns the functor to which this refers. |
int |
getNumberArgs()
returns the number of arguments that the current functor requires. |
java.lang.Class<R> |
getReturnType()
returns the type of objects that the current functor returns. |
boolean |
isConstant()
Returns TRUE if the underlying functor is a constant generator |
boolean |
isIdentity()
Returns TRUE if the underlying functor is a unary identity |
Method Detail |
---|
F getFunctor()
java.lang.Class<R> getReturnType()
int getNumberArgs()
java.lang.Class<?> getArgType(int i)
java.lang.IllegalArgumentException
- if the current functor takes fewer than i
arguments (or if i is < 0)java.lang.String getArgName(int i)
java.lang.IllegalArgumentException
- if the current functor takes fewer than i
arguments (or if i is < 0)boolean isConstant()
boolean isIdentity()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |