Module : java
Module Overview
This module provides the API for Java interoperability in Ballerina. It includes a set of Ballerina annotations with which Java constructors, methods, and fields can provide implementations of Ballerina functions with external function bodies.
For information on the operations, which you can perform with the Java module, see the below Functions. For examples on the usage of the operations, see the following.
- Create Java Objects Example
- Invoke Java Methods Example
- Access/Mutate Java Fields Example
- Java Varargs Example
- Overloaded Methods/Constructors Example
- Java Exceptions Example
ArrayType |
Represents a Java array type. |
ConstructorData |
Describes a Java constructor. |
FieldData |
Describes a Java field. |
MethodData |
Describes a Java method. |
ObjectData |
Describes a Java class that corresponds to a Ballerina object. |
JObject |
The Ballerina abstract object which is to be extended by Ballerina objects representing Ballerina bindings for Java classes. |
cast |
Returns an |
createNull |
Returns a |
fromString |
Returns a |
getClass |
Returns a |
isNull |
Returns |
jObjToString |
Returns the string representation of a Java object stored in a handle reference. |
toString |
Returns a Ballerina |
Binding |
Describes the Java class representing a Ballerina binding. |
Constructor |
Describes a Java constructor, which provides an implementation of a Ballerina function of which the body is marked as
|
FieldGet |
Describes a Java Field access, which provides an implementation of a Ballerina function of which the body is marked as
|
FieldSet |
Describes a Java Field mutate, which provides an implementation of a Ballerina function of which the body is marked as
|
Method |
Describes a Java method, which provides an implementation of a Ballerina function of which the body is marked as
|