| JOOS contains a simple extension to Java that allows the compiler to access libraries
without having to parse class files to determine class signatures. extern classes
An externclass definition contains a class signature along with the name of
a library that is guaranteed to implement that class. The JOOS compiler trusts this
information implicitly and generates code accordingly. Thus, if an extern class is
not correct, then the compiled JOOS program may fail at class loading time. 
The following extern classes have been predefined. They are mainly designed to give access
to the standard Java libraries, either by matching the given signatures or by providing
special JOOS "wrappers" when the signature of a Java class cannot be expressed in JOOS.
 
A JOOS program that uses extern classes must importthe corresponding Java library. 
Note that it is easy to write additional extern classes, provided the corresponding
classes are implemented in some Java library.  When writing an extern,
remember to include a constructor prototype.The file javalib.jooscontains extern classes for the libraries"java.lang.*"and"java.util.*"..The file awtlib.jooscontains extern classes for the library"java.awt.*".The file netlib.jooscontains extern classes for the library"java.net.*".The file appletlib.jooscontains extern classes for the library"java.applet.*".The file jooslib.jooscontains extern classes for JOOS-specific wrappers in"joos.lib". 
The above extern classes are automatically included when the
joosccommand is used. |