Kawa provides various ways to define, create, and access Java objects. Here are the currently supported features.
The Kawa module system is based on the features of the Java class system.
• Defining new classes: | ||
• Anonymous classes: | ||
• Enumerations: | Enumeration types | |
• Annotations: | ||
• Module classes: | Modules and how they are compiled to classes | |
• Importing: | Importing from a library | |
• Record types: | Defining Record Types | |
• Dynamic records: | Creating New Record Types On-the-fly | |
• Method operations: | Calling Java methods from Scheme | |
• Allocating objects: | ||
• Field operations: | Accessing fields of Java objects | |
• Mangling: | Mapping Scheme names to Java names | |
• Scheme types in Java: | ||
• Array operations: | Using Java arrays | |
• Loading Java functions into Scheme: | ||
• Evaluating Scheme expressions from Java: |
Returns the "this object" - the current instance of the current class.
The current implementation is incomplete, not robust, and not
well defined. However, it will have to do for now.
Note: "this
" is a macro, not a variable, so you have to write
it using parentheses: ‘(this)’. A planned extension will
allow an optional class specifier (needed for nested clases).