Class KubeJSContext

java.lang.Object
dev.latvian.mods.rhino.Context
dev.latvian.mods.kubejs.script.KubeJSContext
Direct Known Subclasses:
KubeJSServerContext

public class KubeJSContext extends dev.latvian.mods.rhino.Context
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    final dev.latvian.mods.rhino.Scriptable
     

    Fields inherited from class dev.latvian.mods.rhino.Context

    CONVERSION_EXACT, CONVERSION_NONE, CONVERSION_TRIVIAL, factory, generateObserverCount, JSTYPE_BOOLEAN, JSTYPE_JAVA_ARRAY, JSTYPE_JAVA_CLASS, JSTYPE_JAVA_OBJECT, JSTYPE_NULL, JSTYPE_NUMBER, JSTYPE_OBJECT, JSTYPE_STRING, JSTYPE_UNDEFINED, lock
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    Map<String,com.mojang.datafixers.util.Either<dev.latvian.mods.rhino.NativeJavaClass,Boolean>>
     
     
     
    int
    internalConversionWeightLast(Object fromObj, dev.latvian.mods.rhino.type.TypeInfo target)
     
    protected Object
    internalJsToJavaLast(Object from, dev.latvian.mods.rhino.type.TypeInfo target)
     
    boolean
     
    dev.latvian.mods.rhino.NativeJavaClass
    loadJavaClass(String name, boolean error)
     
    net.minecraft.core.Registry<?>
    lookupRegistry(dev.latvian.mods.rhino.type.TypeInfo type, Object from)
     
    lookupRegistryType(dev.latvian.mods.rhino.type.TypeInfo type, Object from)
     
    mapOf(@Nullable Object from, dev.latvian.mods.rhino.type.TypeInfo kTarget, dev.latvian.mods.rhino.type.TypeInfo vTarget)
     
    boolean
    visibleToScripts(String fullClassName, dev.latvian.mods.rhino.util.ClassVisibilityContext type)
     
    dev.latvian.mods.rhino.Scriptable
    wrapAsJavaObject(dev.latvian.mods.rhino.Scriptable scope, Object javaObject, dev.latvian.mods.rhino.type.TypeInfo target)
     

    Methods inherited from class dev.latvian.mods.rhino.Context

    addToScope, arrayOf, arrayValueProviderOf, callSync, canConvert, coerceToNumber, compileReader, compileString, createClassLoader, createInterfaceAdapter, defaultObjectToSource, doTopCall, evaluateReader, evaluateString, getApplicationClassLoader, getCachedClassStorage, getConversionWeight, getErrorReporter, getImplementationVersion, getInstructionObserverThreshold, getMaximumInterpreterStackDepth, getRegExp, getSizeRank, getSourcePositionFromStack, getThreadLocal, getTopCallOrThrow, getTopCallScope, getUndefinedValue, hasTopCallScope, initJSON, initSafeStandardObjects, initSafeStandardObjects, initSafeStandardObjects, initStandardObjects, initStandardObjects, initStandardObjects, internalConversionWeight, internalJsToJava, isListLike, isStrictMode, javaToJS, javaToJS, jsToJava, lastStoredScriptable, listOf, newArray, newArray, newClassSerialNumber, newObject, newObject, newObject, observeInstructionCount, optionalListOf, optionalListOf, optionalMapOf, optionalMapOf, putThreadLocal, removeThreadLocal, reportConversionError, reportError, reportError, reportRuntimeError, reportRuntimeError, reportRuntimeError0, reportRuntimeError1, reportRuntimeError2, reportRuntimeError3, reportRuntimeError4, reportWarning, reportWarning, setApplicationClassLoader, setGenerateObserverCount, setInstructionObserverThreshold, setOf, setTopCall, storeScriptable, throwAsScriptRuntimeEx, toBoolean, toDouble, toInteger, toNumber, toObject, toString, wrap, wrap, wrapAny, wrapJavaClass, wrapNewObject

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • kjsFactory

      public final KubeJSContextFactory kjsFactory
    • topLevelScope

      public final dev.latvian.mods.rhino.Scriptable topLevelScope
  • Constructor Details

  • Method Details

    • visibleToScripts

      public boolean visibleToScripts(String fullClassName, dev.latvian.mods.rhino.util.ClassVisibilityContext type)
      Overrides:
      visibleToScripts in class dev.latvian.mods.rhino.Context
    • getType

      public ScriptType getType()
    • getConsole

      public ConsoleJS getConsole()
    • getRegistries

      public RegistryAccessContainer getRegistries()
    • wrapAsJavaObject

      public dev.latvian.mods.rhino.Scriptable wrapAsJavaObject(dev.latvian.mods.rhino.Scriptable scope, Object javaObject, dev.latvian.mods.rhino.type.TypeInfo target)
      Overrides:
      wrapAsJavaObject in class dev.latvian.mods.rhino.Context
    • internalConversionWeightLast

      public int internalConversionWeightLast(Object fromObj, dev.latvian.mods.rhino.type.TypeInfo target)
      Overrides:
      internalConversionWeightLast in class dev.latvian.mods.rhino.Context
    • lookupRegistryType

      public RegistryType<?> lookupRegistryType(dev.latvian.mods.rhino.type.TypeInfo type, Object from)
    • lookupRegistry

      public net.minecraft.core.Registry<?> lookupRegistry(dev.latvian.mods.rhino.type.TypeInfo type, Object from)
    • internalJsToJavaLast

      protected Object internalJsToJavaLast(Object from, dev.latvian.mods.rhino.type.TypeInfo target)
      Overrides:
      internalJsToJavaLast in class dev.latvian.mods.rhino.Context
    • loadJavaClass

      public dev.latvian.mods.rhino.NativeJavaClass loadJavaClass(String name, boolean error)
    • classOf

      public Object classOf(Object from)
      Overrides:
      classOf in class dev.latvian.mods.rhino.Context
    • getJavaClassCache

      public Map<String,com.mojang.datafixers.util.Either<dev.latvian.mods.rhino.NativeJavaClass,Boolean>> getJavaClassCache()
    • isMapLike

      public boolean isMapLike(Object from)
      Overrides:
      isMapLike in class dev.latvian.mods.rhino.Context
    • mapOf

      public Object mapOf(@Nullable @Nullable Object from, dev.latvian.mods.rhino.type.TypeInfo kTarget, dev.latvian.mods.rhino.type.TypeInfo vTarget)
      Overrides:
      mapOf in class dev.latvian.mods.rhino.Context