| Home Introduction Using Holon Holon Tools Contact
HolonJForth |
Classes
An application is a collection of classes. Each class is represented by a class file. Class
The class may inherit the properties of a super class.
If no super class is indicated, the class inherits from java.lang.Object. The class may also implement one or more interfaces.
NameThe class file has the same name as the class within the restrictions of MS DOS. A HolonJ module corresponds to a class. The name of the module is free, it can be different from the name of the class. Interface
The methods in an interface are abstract. HolonJ marks the methods of the interface as abstract by default. Objects and constructorsAn object is an instance of a class. The object is created by a method with the command new applied to a global or local class variable.
A class can have several constructors. The actual constructor is selected by its stack signature. The empty stacksignature may also be written (). ThisThe symbol this refers to (an object of) the current class. SuperThe symbol super is not available in HolonJ. Methods in the super class are called like other methods. Example:
Inner classesAn inner class is just another class in HolonJ. It is defined separately from the enclosing class and has a public name. PackageHolonJ is quite happy without a package. The classfiles of the application are then stored in the directory of HolonJ. If you define a package, say
the classfiles are stored in the subdirectory com\holon\project\. HolonJ does not create the directories, please build them separately.
|
|
| © 1999-2005 Wolf Wejgaard |