package org.neoflock.NeoNucleus; import java.util.function.Function; public final class nn_Architecture extends PointerBackedClass implements ManuallyAllocated { public final String name; public final Function handler; public nn_Architecture(String name, Function handler) { // string is a placeholder; please fix this.name = name; this.handler = handler; } private nn_Architecture(String name) { // this overload is used by JNI when returning instances of native nn_Architecture(s) this.name = name; this.handler = (String tmp) -> { // maybe in the future we can let this happen idk throw new IllegalCallerException("Calling native architecture handlers from Java is not allowed!"); }; } private int handleNative() { // i aint gonna be trying to call that Function from jni man return handler.apply("placeholder"); } public native boolean allocate(); public native boolean free(); }