Section "class"
Java Class are first detected as source by the extension “.java” and
then as bytecode by the extension “.class”. They are loaded
asynchronously and dynamically. The convention is cur-rently that
after loading the file, the Dogelog player will call a main()
function of the loaded script, which needs to be present. This leads
to the following idiom:
Example:
import nova.Store;
public final class bitlib {
public static void main() {
Store.add"<name>", <arity>, Special.make_special(<func>));
}
}
Unlike for JavaScript and Python, we don’t have a Façade class for
Java, that can be used for unqualified import of the native API. In
this idiom we see qualified calls such as Store.add() etc.. The idea
is again that loaded scripts have exactly these side effects and
that the Dogelog player can undo register through its rollback
mechanism.
Kommentare