Skip to content

About

Implementation of the GREL functions, in Java

Resources

Stars

5 stars

Watchers

1 watching

Forks

Repository files navigation

FnO GREL Functions

This library provides a standalone library for the GREL functions in JAVA. It also serves as a 'best-practice' example of how to implement your own FnO function implementation in JAVA.

Installation

Import as Maven dependency (Use JitPack):

<dependency>
    <groupId>com.github.fnoio</groupId>
    <artifactId>grel-functions-java</artifactId>
    <version>v0.11.1</version>
</dependency>

Or build it yourself (you'll need Maven + JDK >= 17):

mvn install

Quick start

src/main/java/io/fno/grel contains the functions as public static methods, described as in GREL. src/main/resources/functions_grel.ttl holds their FnO function descriptions, and src/main/resources/grel_java_mapping.ttl maps those descriptions to the methods. The jar ships both, so an FnO function handler can load them from the classpath; HANDBOOK.md explains the two files.

Testing

mvn test

Best practices

Use wrapper classes

Use wrapper classes (Integer, Boolean, ...) for parameters and return types: the FnO function handler handles classes only.

About

Implementation of the GREL functions, in Java

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages