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 to Ballerina functions with external function bodies.
ArrayType | ArrayType represents a Java array type. It is used to specify parameter types in `Constructor` and `Method` annotations. |
ConstructorData | The `ConstructorData` type describes a Java constructor. If the `paramTypes` field is not specified, then parameter types are inferred from the corresponding Ballerina function. |
FieldData | The `FieldData` type describes a Java field. |
MethodData | The `MethodData` type describes a Java method. If the `paramTypes` field is not specified, then parameter types are inferred from the corresponding Ballerina function. |
createNull | Returns a |
fromString | Returns a |
getArrayElement | Returns a This function panics with a |
getArrayLength | Returns the length of the given Java array. This function panics with a |
isNull | Returns |
setArrayElement | Replaces the element at the specified index in the given Java array with the specified element. This function panics with a |
toString | Returns a Ballerina If the |
Constructor | The The following code snippet shows an example usage of this annotation. Here, the
|
FieldGet | The |
FieldSet | The |
Method | The The following code snippet shows an example usage of this annotation. Here, the
The |