Enum Class StreamingIOFunctions
- All Implemented Interfaces:
ScriptFunctionType
,Serializable
,Comparable<StreamingIOFunctions>
,java.lang.constant.Constable
Script common functions for data streaming.
- 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
-
Method Summary
Modifier and TypeMethodDescriptionstatic final ScriptFunctionResolver
abstract boolean
execute
(ScriptInstance scriptInstance, ScriptValue returnValue) Executes this function.int
getUsage()
protected abstract ScriptFunctionType.Usage
usage()
static StreamingIOFunctions
Returns the enum constant of this class with the specified name.static StreamingIOFunctions[]
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, valueOf
Methods inherited from interface com.blackrook.rookscript.lang.ScriptFunctionType
name
-
Enum Constant Details
-
SKIP
- Since:
- 1.7.0, accepts InputStreams.
-
FLUSH
-
RELAY
-
READ
-
WRITE
-
STDIN
-
STDOUT
-
STDERR
-
FISOPEN
-
FOSOPEN
-
BISOPEN
-
BOSOPEN
-
CSROPEN
-
CSWOPEN
-
SROPEN
- Since:
- 1.5.0
-
SWOPEN
- Since:
- 1.5.0
-
CSREAD
-
CSREADLN
-
CSITERATE
-
CSWRITE
-
CSWRITELN
-
-
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:
getParameterCount
in interfaceScriptFunctionType
- Returns:
- the total amount of parameters this takes.
-
getUsage
- Specified by:
getUsage
in interfaceScriptFunctionType
- Returns:
- this function's usage instructions.
-
execute
Description copied from interface:ScriptFunctionType
Executes this function. The value inreturnValue
is automatically pushed onto the stack after the call. If aThrowable
is thrown from this call, it is wrapped in aScriptExecutionException
.ScriptExecutionException
s are thrown as-is.- Specified by:
execute
in 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
-