Package ws.siri.jscore.runtime
Class Module
java.lang.Object
org.mozilla.javascript.ScriptableObject
ws.siri.jscore.runtime.Module
- All Implemented Interfaces:
Serializable,org.mozilla.javascript.ConstProperties,org.mozilla.javascript.debug.DebuggableObject,org.mozilla.javascript.Scriptable,org.mozilla.javascript.SymbolScriptable
public class Module
extends org.mozilla.javascript.ScriptableObject
module object in script
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassObject containing overloaded function for modules.requireNested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObject
org.mozilla.javascript.ScriptableObject.KeyComparator -
Field Summary
FieldsModifier and TypeFieldDescriptionModule.exports objectmodule.require()Fields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTFields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidevaluate an expression in modulevoidevaluateFile(String content, String name) evaluateSimple(String expr) @Nullable Objectexports()booleanstatic PathnormalisePath(Path path) restrict path to be within .minecraft/config/jscore, and remove ../ and ./ accordinglyvoidMethods inherited from class org.mozilla.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChangeForSlot, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureScriptableObjectButNotSymbol, ensureSymbolScriptable, equivalentValues, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSuperProperty, getSuperProperty, getSuperProperty, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putOwnProperty, putOwnProperty, putOwnProperty, putProperty, putProperty, putProperty, putSuperProperty, putSuperProperty, putSuperProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
-
Field Details
-
exports
Module.exports object -
require
module.require() -
eval
-
evalFile
-
applyPrelude
-
-
Constructor Details
-
Module
-
-
Method Details
-
appendPrelude
public void appendPrelude() -
evaluateFile
-
evaluateSimple
-
evaluate
evaluate an expression in module- Parameters:
expr-- Returns:
-
evaluate
-
getClassName
- Specified by:
getClassNamein interfaceorg.mozilla.javascript.Scriptable- Specified by:
getClassNamein classorg.mozilla.javascript.ScriptableObject
-
get
- Specified by:
getin interfaceorg.mozilla.javascript.Scriptable- Overrides:
getin classorg.mozilla.javascript.ScriptableObject
-
put
- Specified by:
putin interfaceorg.mozilla.javascript.Scriptable- Overrides:
putin classorg.mozilla.javascript.ScriptableObject
-
has
- Specified by:
hasin interfaceorg.mozilla.javascript.Scriptable- Overrides:
hasin classorg.mozilla.javascript.ScriptableObject
-
exports
-
normalisePath
restrict path to be within .minecraft/config/jscore, and remove ../ and ./ accordingly- Parameters:
path-- Returns:
-