kerelape / eo-jvm-bridge

Java Object wrapper for EO Programming Language
MIT License
2 stars 0 forks source link

EO principles respected here We recommend IntelliJ IDEA

License

EOLANG Wrapper for java objects.

How-to

Create a java object inside EO program

+alias org.eolang.jvm-bridge.native-object

# Without constructor parameters
native-object "java.lang.StringBuilder"

# With constructor parameters
native-object
  "java.math.BigInteger"
  "8"

Call java object methods

+alias org.eolang.jvm-bridge.native-object

native-object > builder 
  "java.lang.StringBuilder"

builder.append "text"
builder.to-string

All methods of an object are translated to kebab-case (for example, toString turns into to-string)

Nullability

A native-object can be null (nowhere to go, it's java), in this case it will have is-null attribute, being TRUE. If the object is not null, is-null is FALSE.

If an object is null, dataization will throw NullPointerException, in other cases it will call toString of the java object.

How to contribute

Fork repository, make changes, send us a pull request. We will review your changes and apply them to the main branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full Maven build:

$ mvn clean install -Pqulice

You will need Maven 3.3+ and Java 8+.