Interface JavaWrapper


@Info("Methods for working with Java classes. Reflection my beloved \u2665") public interface JavaWrapper
  • Method Details

    • loadClass

      @Info("Loads the specified class, and throws error if class it not found or allowed.\nThe returned object can have public static methods and fields accessed directly from it.\nConstructors can be used with the new keyword.\n") static Object loadClass(KubeJSContext cx, String className)
    • tryLoadClass

      @Info("Loads the specified class, and returns null if class is not found or allowed.\nThe returned object can have public static methods and fields accessed directly from it.\nConstructors can be used with the new keyword.\n") @Nullable static @Nullable Object tryLoadClass(KubeJSContext cx, String className)
    • createConsole

      @Info("Creates a custom ConsoleJS instance for you to use to, well, log stuff") static ConsoleJS createConsole(KubeJSContext cx, String name)
    • makeFunctionProxy

      static <T> T makeFunctionProxy(dev.latvian.mods.rhino.Context cx, dev.latvian.mods.rhino.type.TypeInfo targetClass, dev.latvian.mods.rhino.BaseFunction function)
    • cast

      @Info("Cast the object to a target type, use if Rhino can\'t determine the parameter type due to type erasure.") static <T> T cast(dev.latvian.mods.rhino.Context cx, Class<T> targetClass, Object object)
    • tryLoadClass

      @Nullable @HideFromJS static @Nullable Class<?> tryLoadClass(String className)
    • mergeRecord

      static <R extends Record> R mergeRecord(dev.latvian.mods.rhino.Context cx, R original, Map<String,?> merge)