next up previous contents
Next: Where to put a Up: How user-functors can be Previous: How user-functors can be

Java functors

Java does not support genericity, i.e. functor calls. Hence all Java functors contain Object. In order to give better type information, standard target types for user functors can be declared. These state that instead of Object a finer type is used. The following defines a Java set functor which contains the standard target type MemberDeclaration. This is indicated by setting the field name TargetType to MemberDeclaration. Also a number of function names of the functor are given (AllocFunc .. StopElemFunc).


\begin{examplefoot}/* The MemberDeclarationList functor. */
declare MemberDeclar...
...etFirst,
NextElemFunc => getRest,
StopElemFunc => getLast
);
\end{examplefoot}



Uwe Assmann
1998-12-22