| |||||||||||
| The use of metagen to automatically generate a MINERVA package from an existing Java class. The example shows how to build a program "random.min" that provides one predicate for every constructor and method of defined by the Java class java.util.Random . Note that metagen works for any class available at compile time. To see it in action, use Go.* and Compile.* of this directory. Here are the sources: use_random.min :- package(random). Compile.sh #!/bin/sh echo -n ':- ' > random.min minerva -l $MINERVA_HOME/extender/metagen java.util.Random >> random.min minervac random minervac use_random Go.sh #!/bin/sh minerva -l use_random
Please note that the class Random used in this example is not supported in current versions of Microsoft Java environments. Use some other class. | |||||||||||
| |||||||||||
| Back> |
|