Enum Class SystemFunctions
- All Implemented Interfaces:
ScriptFunctionType,Serializable,Comparable<SystemFunctions>,java.lang.constant.Constable
Script common functions for system level stuff, like process creation, control, and environment stuff.
- Since:
- 1.7.0
- Author:
- Matthew Tropiano
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface com.blackrook.rookscript.lang.ScriptFunctionType
ScriptFunctionType.Usage -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic final ScriptFunctionResolverabstract booleanexecute(ScriptInstance scriptInstance, ScriptValue returnValue) Executes this function.intgetUsage()protected abstract ScriptFunctionType.Usageusage()static SystemFunctionsReturns the enum constant of this class with the specified name.static SystemFunctions[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface com.blackrook.rookscript.lang.ScriptFunctionType
name
-
Enum Constant Details
-
PROPERTIES
-
ENVVARS
-
EXEC
-
EXECRESULT
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
createResolver
- Returns:
- a function resolver that handles all of the functions in this enum.
-
getParameterCount
public int getParameterCount()- Specified by:
getParameterCountin interfaceScriptFunctionType- Returns:
- the total amount of parameters this takes.
-
getUsage
- Specified by:
getUsagein interfaceScriptFunctionType- Returns:
- this function's usage instructions.
-
execute
Description copied from interface:ScriptFunctionTypeExecutes this function. The value inreturnValueis automatically pushed onto the stack after the call. If aThrowableis thrown from this call, it is wrapped in aScriptExecutionException.ScriptExecutionExceptions are thrown as-is.- Specified by:
executein interfaceScriptFunctionType- Parameters:
scriptInstance- the originating script instance.returnValue- the value pushed to the stack on return.- Returns:
- if false, this halts script execution, else if true, continue.
-
usage
-