A B C D E F G H I K L M N O P R S T U V W Y

A

add(Step) - Method in class sleep.engine.Block
 
add(Scalar, int) - Method in interface sleep.runtime.ScalarArray
add an element to the array at the specified index
addGlobalBridge(Loadable) - Method in class sleep.runtime.ScriptLoader
A global bridge is loaded into an environment once and only once.
addKeyword(String) - Static method in class sleep.parser.ParserConfig
registers "keyword" as a keyword with the parser.
addKeyword(String) - Static method in class sleep.runtime.SleepUtils
registers "keyword" as a keyword with the parser.
addSpecificBridge(Loadable) - Method in class sleep.runtime.ScriptLoader
A specific bridge is loaded into *every* script regardless of wether or not the environment is shared.
addToContext(Block, Step) - Method in class sleep.runtime.ScriptEnvironment
 
addWarningWatcher(RuntimeWarningWatcher) - Method in class sleep.runtime.ScriptInstance
Register a runtime warning watcher listener.
ARG_MATCH_MAYBE - Static variable in class sleep.engine.ObjectUtilities
when looking for a Java method that matches the sleep args, we save the maybes and use them as a last resort if no yes match is found
ARG_MATCH_NO - Static variable in class sleep.engine.ObjectUtilities
when looking for a Java method that matches the sleep args, we immediately drop all of the no answers.
ARG_MATCH_YES - Static variable in class sleep.engine.ObjectUtilities
when looking for a Java method that matches the sleep args, we use a Yes match immediately
array - Variable in class sleep.runtime.Scalar
 
associateFile(File) - Method in class sleep.runtime.ScriptInstance
associates the specified source file with this script

B

beginToplevel(LinkedList) - Method in class sleep.runtime.ScriptVariables
called when a closure is entered, allows an old stack of local scopes to be restored easily
bindFilteredFunction(ScriptInstance, String, String, String, Block) - Method in interface sleep.interfaces.FilterEnvironment
binds a function (functionName) of a certain type (typeKeyword) to the defined functionBody.
bindFunction(ScriptInstance, String, String, Block) - Method in interface sleep.interfaces.Environment
binds a function (functionName) of a certain type (typeKeyword) to the defined functionBody.
bindPredicate(ScriptInstance, String, Check, Block) - Method in interface sleep.interfaces.PredicateEnvironment
binds a function (functionName) of a certain type (typeKeyword) to the defined functionBody.
Block - Class in sleep.engine
A Block is the fundamental unit of parsed and ready to execute sleep code.
Block(String) - Constructor for class sleep.engine.Block
 
block - Variable in class sleep.runtime.ScriptEnvironment.Context
 
BLOCK_CACHE - Static variable in class sleep.runtime.ScriptLoader
cache for parsed scripts mantained (optionally) by the script loader.
bridgesg - Variable in class sleep.runtime.ScriptLoader
global bridges
bridgess - Variable in class sleep.runtime.ScriptLoader
specific bridges
BridgeUtilities - Class in sleep.bridges
A bridge is a class that bridges your applications API and sleep.
BridgeUtilities() - Constructor for class sleep.bridges.BridgeUtilities
 
buildArgument(Class, Scalar, ScriptInstance) - Static method in class sleep.engine.ObjectUtilities
marshalls the Sleep value into a Java value of the specified type.
buildArgumentArray(Class[], Stack, ScriptInstance) - Static method in class sleep.engine.ObjectUtilities
populates a Java array with Sleep values marshalled into values of the specified types.
buildArgumentErrorMessage(Class, String, Class[], Object[]) - Static method in class sleep.engine.ObjectUtilities
utility to create a string representation of an incompatible argument choice
BuildInterface(Class, Function, ScriptInstance) - Static method in class sleep.engine.ProxyInterface
Constructs a new instance of the specified class that uses the passed Sleep function to respond to all method calls on this instance.
BuildInterface(Class[], Function, ScriptInstance) - Static method in class sleep.engine.ProxyInterface
Constructs a new instance of the specified class that uses the passed Sleep function to respond to all method calls on this instance.
BuildInterface(Class, Block, ScriptInstance) - Static method in class sleep.engine.ProxyInterface
Constructs a new instance of the specified class that uses the passed block to respond to all method calls on this instance.
BuildInterface(Class[], Block, ScriptInstance) - Static method in class sleep.engine.ProxyInterface
Constructs a new instance of the specified class that uses the passed block to respond to all method calls on this instance.
BuildScalar(boolean, Object) - Static method in class sleep.engine.ObjectUtilities
marshalls a Java type into the appropriate Sleep scalar.

C

callClosure(String, ScriptInstance, Stack) - Method in class sleep.bridges.SleepClosure
"Safely" calls this closure.
callFunction(String, Stack) - Method in class sleep.runtime.ScriptInstance
Calls a subroutine/built-in function using this script.
calls - Variable in class sleep.runtime.ScriptInstance.ProfilerStatistic
the total number of times this function has been called
chdir(File) - Method in class sleep.runtime.ScriptInstance
sets the current working directory value for this script
Check - Class in sleep.engine.atoms
A check object is the internal atomic step representing a predicate condition.
Check(String, Block) - Constructor for class sleep.engine.atoms.Check
Constructs a check object, call by the sleep engine.
check(ScriptEnvironment) - Method in class sleep.engine.atoms.Check
Performs this "check".
checkArguments(Stack) - Static method in class sleep.taint.TaintUtils
checks the specified argument stack for tainted values.
checkError() - Method in class sleep.runtime.ScriptEnvironment
once an error is checked using this function, it is cleared, the orignal error message is returned as well
cleanFrame(int) - Method in class sleep.runtime.ScriptEnvironment
markFrame and cleanFrame are used to keep the sleep stack in good order after certain error conditions
clearReturn() - Method in class sleep.runtime.ScriptEnvironment
Clears the return value from the last executed function.
clearStackTrace() - Method in class sleep.runtime.ScriptInstance
Removes the top element of the stack trace
close() - Method in class sleep.bridges.io.IOObject
Closes all of the reader's / writer's opened by this IOObject.
closure - Variable in class sleep.runtime.ScriptVariables
 
code - Variable in class sleep.error.SyntaxError
 
collect(String, int, long) - Method in class sleep.runtime.ScriptInstance
this function is used internally by the sleep interpreter to collect profiler statistics when DEBUG_TRACE_CALLS or DEBUG_TRACE_PROFILE_ONLY is enabled
compareTo(Object) - Method in class sleep.runtime.ScriptInstance.ProfilerStatistic
used to compare this statistic to other statistics for the sake of sorting
compileScript(String, InputStream) - Method in class sleep.runtime.ScriptLoader
compiles a script using the specified stream as a source
compileScript(File) - Method in class sleep.runtime.ScriptLoader
compiles the specified script file
compileScript(String) - Method in class sleep.runtime.ScriptLoader
compiles the specified script file
compileScript(String, String) - Method in class sleep.runtime.ScriptLoader
compiles the specified script into a runnable block
ConsoleImplementation - Class in sleep.console
The ConsoleImplementation is the "engine" behind the sleep console.
ConsoleImplementation() - Constructor for class sleep.console.ConsoleImplementation
Creates an implementation of the sleep console.
ConsoleImplementation(Hashtable, Variable, ScriptLoader) - Constructor for class sleep.console.ConsoleImplementation
Creates an implementation of the sleep console that shares what your application is already using.
consolePrint(String) - Method in class sleep.console.ConsoleImplementation
Dummy implementation, does nothing really.
consolePrint(String) - Method in interface sleep.console.ConsoleProxy
print a message to the console with no newline
consolePrintln(Object) - Method in class sleep.console.ConsoleImplementation
Dummy implementation, does nothing.
consolePrintln(Object) - Method in interface sleep.console.ConsoleProxy
print a message to the console with a newline
ConsoleProxy - Interface in sleep.console
a necessary interface for creating a front end to the sleep console.
consoleReadln() - Method in class sleep.console.ConsoleImplementation
Dummy implementation, always returns null.
consoleReadln() - Method in interface sleep.console.ConsoleProxy
read a message in from the console.
context - Variable in class sleep.runtime.ScriptEnvironment
 
contextStack - Variable in class sleep.runtime.ScriptEnvironment
 
convertDescriptionToClass(String) - Static method in class sleep.engine.ObjectUtilities
converts the one character class description to the specified Class type, i.e.
convertScalarDescriptionToClass(Scalar) - Static method in class sleep.engine.ObjectUtilities
this function checks if the specified scalar is a Class literal and uses that if it is, otherwise description is converted to a string and the convertDescriptionToClass method is used
copyValue() - Method in interface sleep.runtime.ScalarType
create a clone of this scalar's value.
CreateFrame(Stack) - Method in class sleep.runtime.ScriptEnvironment
 
CreateFrame() - Method in class sleep.runtime.ScriptEnvironment
 
createInternalVariableContainer() - Method in interface sleep.interfaces.Variable
returns which variable environment is used to store non-global / non-local variables.
createLocalVariableContainer() - Method in interface sleep.interfaces.Variable
returns which variable environment is used to temporarily store local variables.
currentHandler - Variable in class sleep.runtime.ScriptEnvironment
 
cwd() - Method in class sleep.runtime.ScriptInstance
return the current working directory value associated with this script.

D

debug - Variable in class sleep.runtime.ScriptInstance
track all of the flagged debug options for this script (set to DEBUG_SHOW_ERRORS by default)
DEBUG_NONE - Static variable in class sleep.runtime.ScriptInstance
debug should be absolutely quiet, never fire any runtime warnings
DEBUG_REQUIRE_STRICT - Static variable in class sleep.runtime.ScriptInstance
fire runtime warning whenever an undeclared variable is fired
DEBUG_SHOW_ERRORS - Static variable in class sleep.runtime.ScriptInstance
fire runtime warnings for all critical flow interrupting errors
DEBUG_SHOW_WARNINGS - Static variable in class sleep.runtime.ScriptInstance
fire runtime warnings for anything flagged for retrieval with checkError()
DEBUG_THROW_WARNINGS - Static variable in class sleep.runtime.ScriptInstance
throw exceptions for anything flagged for retrieval with checkError()
DEBUG_TRACE_CALLS - Static variable in class sleep.runtime.ScriptInstance
fire a runtime warning describing each function call
DEBUG_TRACE_LOGIC - Static variable in class sleep.runtime.ScriptInstance
fire a runtime warning describing each predicate decision made
DEBUG_TRACE_PROFILE_ONLY - Static variable in class sleep.runtime.ScriptInstance
forces function call tracing to occur (for the sake of profiling a script) but supresses all runtime warnings as a result of the tracing
DEBUG_TRACE_SUPPRESS - Static variable in class sleep.runtime.ScriptInstance
users shouldn't need to flag this, it is just a general method of saying we're suppressing trace messages...
DEBUG_TRACE_TAINT - Static variable in class sleep.runtime.ScriptInstance
trace the passage of tainted data
debugString - Variable in class sleep.runtime.ScriptEnvironment
 
decide(String, ScriptInstance, Stack) - Method in interface sleep.interfaces.Predicate
decides the truthfulness of the proposition predicateName applied to the passedInTerms.
describe(Stack) - Static method in class sleep.runtime.SleepUtils
returns a comma separated list of descriptions of the scalars in the specified argument stack.
describe(Scalar) - Static method in class sleep.runtime.SleepUtils
returns a string description of the specified scalar.
description - Variable in class sleep.error.SyntaxError
 
description - Variable in class sleep.runtime.ScriptInstance.SleepStackElement
 
disableConversions - Variable in class sleep.runtime.ScriptLoader
 
doubleValue() - Method in class sleep.runtime.Scalar
the double value of this scalar
doubleValue() - Method in interface sleep.runtime.ScalarType
convert the scalar to a double

E

Environment - Interface in sleep.interfaces
Blocks of code associated with an identifier are processed by their environment.
environment - Variable in class sleep.runtime.ScriptEnvironment
the environment hashtable that contains all of the functions, predicates, operators, and "environment keywords" this script has access to.
environment - Variable in class sleep.runtime.ScriptInstance
The script environment which contains all of the runtime info for a script
environmentStack - Variable in class sleep.runtime.ScriptEnvironment
the runtime data stack for this environment
errorMessage - Variable in class sleep.runtime.ScriptEnvironment
stored error message...
evaluate(String, ScriptInstance, Stack) - Method in class sleep.bridges.SleepClosure
Evaluates the closure, use callClosure instead.
evaluate(ScriptEnvironment) - Method in class sleep.engine.Block
evaluates this block of code.
evaluate(ScriptEnvironment, Step) - Method in class sleep.engine.Block
evaluates this block of code.
evaluate(String, ScriptInstance, Stack) - Method in interface sleep.interfaces.Function
Evaluate a function and return the resulting scalar.
evaluateExpression(String) - Method in class sleep.runtime.ScriptEnvironment
evaluates an expression
evaluateOldContext() - Method in class sleep.runtime.ScriptEnvironment
 
evaluateParsedLiteral(String) - Method in class sleep.runtime.ScriptEnvironment
evaluates the passed in code as if it was a sleep parsed literal
evaluatePredicate(String) - Method in class sleep.runtime.ScriptEnvironment
evaluates a predicate condition
evaluateStatement(String) - Method in class sleep.runtime.ScriptEnvironment
evaluate a full blown statement...
exhandlers - Variable in class sleep.runtime.ScriptEnvironment
 
expectArray(String, Scalar) - Static method in class sleep.bridges.BridgeUtilities
returns true if value is an array or throws an appropriate exception if value is not an array.
extractNamedParameters(Stack) - Static method in class sleep.bridges.BridgeUtilities
extracts all named parameters from the argument stack.

F

FilterEnvironment - Interface in sleep.interfaces
Filtered environments are similar to normal keyword environments except they also allow a parameter specified by the user.
findConstructor(Class, Stack) - Static method in class sleep.engine.ObjectUtilities
attempts to find the constructor that is the closest match to the arguments
findex - Variable in class sleep.runtime.ScriptEnvironment
 
findJarFile(String) - Static method in class sleep.parser.ParserConfig
Search the sleep classpath for the specified file.
findMethod(Class, String, Stack) - Static method in class sleep.engine.ObjectUtilities
attempts to find the method that is the closest match to the specified arguments
fireWarning(String, int) - Method in class sleep.runtime.ScriptInstance
Fire a runtime script warning
fireWarning(String, int, boolean) - Method in class sleep.runtime.ScriptInstance
Fire a runtime script warning
first - Variable in class sleep.engine.Block
our first step in this block
flagError(Object) - Method in class sleep.runtime.ScriptEnvironment
A utility for bridge writers to flag an error.
flagReturn(Scalar, int) - Method in class sleep.runtime.ScriptEnvironment
flags a return value for this script environment
flattenArray(Scalar, Scalar) - Static method in class sleep.bridges.BridgeUtilities
Flattens the specified scalar array.
flattenIterator(Iterator, Scalar) - Static method in class sleep.bridges.BridgeUtilities
Flattens the specified arrays within the specified iterator.
FLOW_CONTROL_BREAK - Static variable in class sleep.runtime.ScriptEnvironment
request a break out of the current loop
FLOW_CONTROL_CALLCC - Static variable in class sleep.runtime.ScriptEnvironment
adding a callcc keyword
FLOW_CONTROL_CONTINUE - Static variable in class sleep.runtime.ScriptEnvironment
adding a continue keyword as people keep demanding it
FLOW_CONTROL_DEBUG - Static variable in class sleep.runtime.ScriptEnvironment
a special case for debugs and such
FLOW_CONTROL_NONE - Static variable in class sleep.runtime.ScriptEnvironment
currently no flow control change has been requested
FLOW_CONTROL_PASS - Static variable in class sleep.runtime.ScriptEnvironment
a special case, pass control flow to the return value (it better be a function!)
FLOW_CONTROL_RETURN - Static variable in class sleep.runtime.ScriptEnvironment
request a return from the current function
FLOW_CONTROL_THROW - Static variable in class sleep.runtime.ScriptEnvironment
adding a throw keyword -- sleep is now useable :)
FLOW_CONTROL_YIELD - Static variable in class sleep.runtime.ScriptEnvironment
adding a yield keyword
fork() - Method in class sleep.runtime.ScriptInstance
Creates a forked script instance.
formatErrors() - Method in exception sleep.error.YourCodeSucksException
generate a nicely formatted string representation of the script errors in this exception
FrameResult(Scalar) - Method in class sleep.runtime.ScriptEnvironment
kills the current frame and if there is a parent frame pushes the specified value on to it
frames - Variable in class sleep.runtime.ScriptEnvironment
 
func - Variable in class sleep.engine.ProxyInterface
 
Function - Interface in sleep.interfaces
A function bridge is used to define a built-in function.
functionName - Variable in class sleep.runtime.ScriptInstance.ProfilerStatistic
the name of the function call

G

getAccessOrderedHashScalar() - Static method in class sleep.runtime.SleepUtils
returns an empty access ordered hashmap scalar
getActualValue() - Method in class sleep.runtime.Scalar
Returns the actual non-array/non-hash value this scalar contains.
getAndRemoveMetadata(Object, Object) - Method in class sleep.bridges.SleepClosure
obtain a key from the metadata store associated with this closure
getApproximateLineNumber() - Method in class sleep.engine.Block
Returns an approximated line number for the steps in this block object...
getApproximateLineRange() - Method in class sleep.engine.Block
Returns an approximate range of line numbers for the steps in this block object.
getArgumentStack(Map) - Static method in class sleep.runtime.SleepUtils
Generate a java.util.Stack of sleep.bridges.KeyValuePair arguments from a Map.
getArray(Stack) - Static method in class sleep.bridges.BridgeUtilities
grab a sleep array, if the stack is empty a scalar array with no elements will be returned.
getArray() - Method in class sleep.runtime.Scalar
returns a scalar array referenced by this scalar iff this scalar contains an array reference
getArrayScalar(ScalarArray) - Static method in class sleep.runtime.SleepUtils
Creates a scalar with the specified ScalarArray as the value
getArrayScalar() - Static method in class sleep.runtime.SleepUtils
returns a Scalar variable containing a SLEEP array as its value (everything in SLEEP is stored as a Scalar
getArrayType(Scalar, Class) - Static method in class sleep.engine.ObjectUtilities
Determines the primitive type of the specified array.
getArrayWrapper(Collection) - Static method in class sleep.runtime.SleepUtils
An easy way to make your programs data structures available in the script environment.
getAt(int) - Method in interface sleep.runtime.ScalarArray
get an element at the specified index
getAt(Scalar) - Method in interface sleep.runtime.ScalarHash
Retrieves a scalar from the hashtable.
getBlock(String) - Method in class sleep.runtime.ScriptEnvironment
 
getCharset() - Method in class sleep.runtime.ScriptLoader
 
getClass(Stack, Class) - Static method in class sleep.bridges.BridgeUtilities
grab a class, if the stack is empty the default value will be returned
getClosureVariables() - Method in class sleep.runtime.ScriptVariables
returns the current closure variable scope
getClosureVariables(SleepClosure) - Method in class sleep.runtime.ScriptVariables
returns the closure level variables for this specific script environment
getCodeSnippet() - Method in class sleep.error.SyntaxError
return an isolated snippet of code from where the error occured
getConsole(ScriptEnvironment) - Static method in class sleep.bridges.io.IOObject
returns an IOObject that represents stdin/stdout to Sleep's I/O API.
getContextMetadata(Object) - Method in class sleep.runtime.ScriptEnvironment
Returns the data associated with the particular key for this context.
getContextMetadata(Object, Object) - Method in class sleep.runtime.ScriptEnvironment
Returns the data associated with the particular key for this context.
getCurrentFrame() - Method in class sleep.runtime.ScriptEnvironment
 
getCurrentSource() - Method in class sleep.runtime.ScriptEnvironment
obtain the filename of the current source of execution
getData() - Method in interface sleep.runtime.ScalarHash
Return the data structure backing this hash please
getDebugFlags() - Method in class sleep.runtime.ScriptInstance
retrieve the debug flags for this script
getDebugString() - Method in class sleep.runtime.ScriptEnvironment
 
getDescription() - Method in class sleep.error.SyntaxError
return a best guess description of what the error in the code might actually be
getDouble(Stack) - Static method in class sleep.bridges.BridgeUtilities
grab a double.
getDouble(Stack, double) - Static method in class sleep.bridges.BridgeUtilities
grab a double, if the stack is empty the default value will be returned
getEmptyScalar() - Static method in class sleep.runtime.SleepUtils
returns the null scalar, which will always be equal to 0, "", and null simultaneously.
getEnvironment() - Method in class sleep.runtime.ScriptEnvironment
Returns the environment for this script.
getEnvironmentStack() - Method in class sleep.runtime.ScriptEnvironment
returns the environment stack used for temporary calculations and such.
getErrors() - Method in exception sleep.error.YourCodeSucksException
All of the errors are stored in a linked list.
getExceptionHandler() - Method in class sleep.runtime.ScriptEnvironment
preps and returns the current exception handler...
getExceptionMessage() - Method in class sleep.runtime.ScriptEnvironment
if there is no handler, we'll just get the message which will clear the thrown message as well
getFile(Stack, ScriptInstance) - Static method in class sleep.bridges.BridgeUtilities
returns a File object from a string argument, the path in the string argument is transformed such that the character / will refer to the correct path separator for the current OS.
getFilterEnvironment(String) - Method in class sleep.runtime.ScriptEnvironment
 
getFirstScriptEnvironment() - Method in class sleep.runtime.ScriptLoader
Convienence method to return the script environment of the first script tht was loaded, returns null if no scripts are loaded
getFlowControlRequest() - Method in class sleep.runtime.ScriptEnvironment
 
getFunction(Stack, ScriptInstance) - Static method in class sleep.bridges.BridgeUtilities
retrieves an executable Function object from the stack.
getFunction(String) - Method in class sleep.runtime.ScriptEnvironment
 
getFunctionEnvironment(String) - Method in class sleep.runtime.ScriptEnvironment
 
getFunctionFromScalar(Scalar) - Static method in class sleep.runtime.SleepUtils
extracts a callable Function from the passed in Scalar.
getFunctionFromScalar(Scalar, ScriptInstance) - Static method in class sleep.runtime.SleepUtils
extracts a callable Function from the passed in Scalar.
getGlobalVariables() - Method in class sleep.runtime.ScriptVariables
returns the global variable scope
getHash(Stack) - Static method in class sleep.bridges.BridgeUtilities
grab a sleep hash, if the stack is empty a scalar hash with no members will be returned.
getHash() - Method in class sleep.runtime.Scalar
returns a scalar hash referenced by this scalar iff this scalar contains a hash reference
getHashScalar(ScalarHash) - Static method in class sleep.runtime.SleepUtils
Creates a scalar with the specified ScalarHash as the value
getHashScalar() - Static method in class sleep.runtime.SleepUtils
returns an empty hashmap scalar
getHashWrapper(Map) - Static method in class sleep.runtime.SleepUtils
An easy way to make your programs data structures available in the script environment.
getHighLineNumber() - Method in class sleep.engine.Block
return the highest line number associated with this block
getInputBuffer() - Method in class sleep.bridges.io.IOObject
Returns the ascii data reader
getInputStream() - Method in class sleep.bridges.io.IOObject
Returns the latest hooking point into the input stream
getInt(Stack) - Static method in class sleep.bridges.BridgeUtilities
grab an integer.
getInt(Stack, int) - Static method in class sleep.bridges.BridgeUtilities
grab an integer, if the stack is empty the default value will be returned
getIOHandle(InputStream, OutputStream) - Static method in class sleep.runtime.SleepUtils
creates an IO handle scalar suitable for use with the sleep IO API.
getIOHandleScalar(InputStream, OutputStream) - Static method in class sleep.runtime.SleepUtils
creates an IO handle scalar suitable for use with the sleep IO API.
getIterator(Stack, ScriptInstance) - Static method in class sleep.bridges.BridgeUtilities
grabs a scalar iterator, this can come from either an array or a closure called continuously until $null is returned.
getIterator(Scalar, ScriptInstance) - Static method in class sleep.runtime.SleepUtils
Returns a scalar iterator depending grabbed from the Scalar.
getKey() - Method in class sleep.bridges.KeyValuePair
Obtain the key portion of this pair
getKeyValuePair(Stack) - Static method in class sleep.bridges.BridgeUtilities
Pops a Key/Value pair object off of the argument stack.
getLineNumber() - Method in class sleep.error.ScriptWarning
returns the line number in the source script where the runtime error/warning occured
getLineNumber() - Method in class sleep.error.SyntaxError
return the line number in the file where the error occured.
getListFromArray(Scalar) - Static method in class sleep.runtime.SleepUtils
Generate a java.util.List from a scalar array.
getListFromArray(ScalarArray) - Static method in class sleep.runtime.SleepUtils
Generate a java.util.List from a scalar array.
getLocalVariables() - Method in class sleep.runtime.ScriptVariables
returns the current local variable scope
getLong(Stack) - Static method in class sleep.bridges.BridgeUtilities
grab a long.
getLong(Stack, long) - Static method in class sleep.bridges.BridgeUtilities
grab a long, if the stack is empty the default value will be returned
getLowLineNumber() - Method in class sleep.engine.Block
return the lowest line number associated with this block
getMapFromHash(Scalar) - Static method in class sleep.runtime.SleepUtils
Generate a java.util.Map from a scalar hash.
getMapFromHash(ScalarHash) - Static method in class sleep.runtime.SleepUtils
Generate a java.util.Map from a scalar hash.
getMarker() - Method in class sleep.error.SyntaxError
return a marker string
getMessage() - Method in class sleep.error.ScriptWarning
returns a short synopsis of what the warnng is
getMessage() - Method in exception sleep.error.YourCodeSucksException
Returns a minimal string representation of the errors within this exception
getMetadata() - Method in class sleep.runtime.ScriptInstance
retrieves script meta data for you to update
getName() - Method in class sleep.runtime.ScriptInstance
Returns the name of this script (typically a full pathname) as a String
getNameShort() - Method in class sleep.error.ScriptWarning
returns just the filename of the source script
getObject(Stack) - Static method in class sleep.bridges.BridgeUtilities
grab an object, if the stack is empty then null will be returned.
getOperator(String) - Method in class sleep.runtime.ScriptEnvironment
 
getOrderedHashScalar() - Static method in class sleep.runtime.SleepUtils
returns an empty insertion ordered hashmap scalar
getOutputStream() - Method in class sleep.bridges.io.IOObject
Returns the latest hooking point into the output stream
getOwner() - Method in class sleep.bridges.SleepClosure
Returns the owning script instance
getOwner() - Method in class sleep.engine.ProxyInterface
Returns the script associated with this proxy interface.
getPredicate(String) - Method in class sleep.runtime.ScriptEnvironment
 
getPredicateEnvironment(String) - Method in class sleep.runtime.ScriptEnvironment
 
getProfilerStatistics() - Method in class sleep.runtime.ScriptInstance
Returns a sorted (in order of total ticks used) list of function call statistics for this script environment.
getProxy() - Method in class sleep.console.ConsoleImplementation
Returns the current console proxy being used
getReader() - Method in class sleep.bridges.io.IOObject
Returns the binary data reader
getReturnValue() - Method in class sleep.runtime.ScriptEnvironment
 
getRunnableBlock() - Method in class sleep.runtime.ScriptInstance
Returns the compiled form of this script
getRunnableCode() - Method in class sleep.bridges.SleepClosure
Returns the runnable block of code associated with this closure
getRunnableScript() - Method in class sleep.runtime.ScriptInstance
Returns this toplevel script as a Sleep closure.
getScalar(Stack) - Static method in class sleep.bridges.BridgeUtilities
grab a scalar, if the stack is empty the empty/null scalar will be returned.
getScalar(String) - Method in interface sleep.interfaces.Variable
returns the specified scalar, if scalarExists says it is in the environment, this method has to return a scalar
getScalar(String) - Method in class sleep.runtime.ScriptEnvironment
returns a scalar from this scripts environment
getScalar(String) - Method in class sleep.runtime.ScriptVariables
retrieves a scalar
getScalar(String, ScriptInstance) - Method in class sleep.runtime.ScriptVariables
Returns the specified scalar, looking at each scope in order.
getScalar(int) - Static method in class sleep.runtime.SleepUtils
returns an int scalar with value x
getScalar(short) - Static method in class sleep.runtime.SleepUtils
returns an int scalar (coverted from the short) with value x
getScalar(float) - Static method in class sleep.runtime.SleepUtils
returns a double scalar (coverted from the float) with value x
getScalar(double) - Static method in class sleep.runtime.SleepUtils
returns a double scalar with value x
getScalar(Scalar) - Static method in class sleep.runtime.SleepUtils
Forces a copy of the value of the passed in scalar to be made.
getScalar(long) - Static method in class sleep.runtime.SleepUtils
returns a long scalar with value x
getScalar(byte[]) - Static method in class sleep.runtime.SleepUtils
constructs a string scalar with value x interpreted as an array of unsigned bytes
getScalar(byte[], int) - Static method in class sleep.runtime.SleepUtils
constructs a string scalar with value x interpreted as an array of unsigned bytes
getScalar(String) - Static method in class sleep.runtime.SleepUtils
returns a string scalar with value x
getScalar(Object) - Static method in class sleep.runtime.SleepUtils
returns an object scalar with value x
getScalar(boolean) - Static method in class sleep.runtime.SleepUtils
if x is true, the value will be 1, if x is false the value will be the empty scalar
getScalarLevel(String, ScriptInstance) - Method in class sleep.runtime.ScriptVariables
retrieves the appropriate Variable container that has the specified key.
getScriptEnvironment() - Method in class sleep.runtime.ScriptInstance
Returns this scripts runtime environment
getScriptInstance() - Method in class sleep.runtime.ScriptEnvironment
returns a reference to the script associated with this environment
getScriptName() - Method in class sleep.error.ScriptWarning
returns the full path for the source script
getScripts() - Method in class sleep.runtime.ScriptLoader
Returns a linked list of all loaded ScriptInstance objects
getScriptsByKey() - Method in class sleep.runtime.ScriptLoader
Returns a HashMap with all loaded scripts, the key is a string which is just the filename, the value is a ScriptInstance object
getScriptsToLoad(Set) - Method in class sleep.runtime.ScriptLoader
A convienence method to determine the set of scripts to "load" based on a passed in set of scripts that are currently configured.
getScriptsToUnload(Set) - Method in class sleep.runtime.ScriptLoader
A convienence method to determine the set of scripts to "unload" based on a passed in set of scripts that are currently configured.
getScriptVariables() - Method in class sleep.runtime.ScriptEnvironment
returns the variable manager for this script
getScriptVariables() - Method in class sleep.runtime.ScriptInstance
Returns the variable container used by this script
getSleepClasspath() - Static method in class sleep.parser.ParserConfig
Query the Sleep classpath.
getSource() - Method in class sleep.bridges.io.IOObject
return the actual source of this IO for scripters to query using HOES
getSource() - Method in class sleep.engine.Block
Returns the source identifier for this block
getSource() - Method in class sleep.error.ScriptWarning
returns the ScriptInstance object that was the source of this runtime error
getSourceLocation() - Method in class sleep.engine.Block
Returns a string representation of where in the source code this block originated from
getStackTrace() - Method in class sleep.runtime.ScriptInstance
Returns the last stack trace.
getString(Stack, String) - Static method in class sleep.bridges.BridgeUtilities
grab a string, if the stack is empty or if the value is null the default value will be returned.
getThread() - Method in class sleep.bridges.io.IOObject
returns the thread associated with this IOObject
getToken() - Method in class sleep.bridges.io.IOObject
returns a scalar token associated with this IOObject.
getType() - Method in interface sleep.runtime.ScalarType
returns the Class type of this ScalarType.
getValue() - Method in class sleep.bridges.KeyValuePair
Obtain the value portion of this pair
getValue() - Method in class sleep.runtime.Scalar
Returns the container for the scalars value.
getVariables() - Method in class sleep.bridges.SleepClosure
Returns the variable container for this closures
getWorkableArray(Stack) - Static method in class sleep.bridges.BridgeUtilities
grab a sleep array, if the grabbed array is a readonly array, a copy is returned.
getWriter() - Method in class sleep.bridges.io.IOObject
Returns the binary data writer
global - Variable in class sleep.runtime.ScriptVariables
 

H

handleExceptionFromJava(Throwable, ScriptEnvironment, String, int) - Static method in class sleep.engine.ObjectUtilities
Standard method to handle a Java exception from a HOES call.
handler - Variable in class sleep.runtime.ScriptEnvironment.Context
 
handler - Variable in class sleep.runtime.ScriptEnvironment.ExceptionContext
 
hasChanged() - Method in class sleep.runtime.ScriptInstance
this script instance checks if (to the best of its knowledge) any of its source files have changed
hasFrame() - Method in class sleep.runtime.ScriptEnvironment
 
hash - Variable in class sleep.runtime.Scalar
 
hasNext() - Method in class sleep.runtime.ProxyIterator
 
haveMoreLocals() - Method in class sleep.runtime.ScriptVariables
used to check if other local scopes exist after the next pop

I

identity() - Method in class sleep.runtime.Scalar
returns an identity value for this scalar.
in - Variable in class sleep.bridges.io.IOObject
 
initDefaultBridges() - Method in class sleep.runtime.ScriptLoader
method call to initialize the default bridges, if you want to change the default bridges subclass this class and override this method
initLocalScope(ScriptVariables, Variable, Stack) - Static method in class sleep.bridges.BridgeUtilities
initializes local scope based on argument stack
inProcessScript(String, ScriptInstance) - Method in class sleep.runtime.ScriptLoader
Process the newly loaded script.
installBlock(Block) - Method in class sleep.runtime.ScriptInstance
Install a block as the compiled script code
installEscapeConstant(char, String) - Static method in class sleep.parser.ParserConfig
Installs an escape constant into the sleep parser.
installExceptionHandler(ScriptEnvironment.ExceptionContext) - Method in class sleep.runtime.ScriptEnvironment
 
installExceptionHandler(Block, Block, String) - Method in class sleep.runtime.ScriptEnvironment
 
intValue() - Method in class sleep.runtime.Scalar
the int value of this scalar
intValue() - Method in interface sleep.runtime.ScalarType
convert the scalar to an int
invoke(Object, Method, Object[]) - Method in class sleep.engine.ProxyInterface
This function invokes the contained Sleep closure with the specified arguments
IOObject - Class in sleep.bridges.io
The IOObject is the parent class for all IO Source objects that are compatible with Sleep's I/O API.
IOObject() - Constructor for class sleep.bridges.io.IOObject
 
isArgMatch(Class[], Stack) - Static method in class sleep.engine.ObjectUtilities
convienence method to determine wether or not the stack of values is a safe match for the specified method signature
isArgMatch(Class, Scalar) - Static method in class sleep.engine.ObjectUtilities
determined if the specified scalar can be rightfully cast to the specified class
isCallCC() - Method in class sleep.runtime.ScriptEnvironment
 
isCharsetConversions() - Method in class sleep.runtime.ScriptLoader
 
isDebugInterrupt() - Method in class sleep.runtime.ScriptEnvironment
 
isDebugTrace() - Method in class sleep.error.ScriptWarning
is this a trace message for one of the trace debug options
isEmptyScalar(Scalar) - Static method in class sleep.runtime.SleepUtils
returns true if the passed in scalar value is equivalent to the empty scalar or null
isEOF() - Method in class sleep.bridges.io.IOObject
Returns true if the reader is closed
isExceptionHandlerInstalled() - Method in class sleep.runtime.ScriptEnvironment
 
isFunctionScalar(Scalar) - Static method in class sleep.runtime.SleepUtils
Determines if the passed in scalar represents a "function" value.
isIterator(Scalar) - Static method in class sleep.runtime.ProxyIterator
Check if the Scalar contains a Java iterator value
isLoaded() - Method in class sleep.runtime.ScriptInstance
Returns wether or not this script is loaded.
isLoaded(String) - Method in class sleep.runtime.ScriptLoader
Determines wether or not the script is loaded by checking if the specified key exists in the script db.
isPassControl() - Method in class sleep.runtime.ScriptEnvironment
 
isProfileOnly() - Method in class sleep.runtime.ScriptInstance
a quick way to check if we are profiling and not tracing the script steps
isResponsible(Block) - Method in class sleep.runtime.ScriptEnvironment
 
isReturn() - Method in class sleep.runtime.ScriptEnvironment
 
isTainted(Scalar) - Static method in class sleep.taint.TaintUtils
checks if a scalar is tainted
isTaintMode() - Static method in class sleep.taint.TaintUtils
checks if Sleep is in taint mode or not.
isThrownValue() - Method in class sleep.runtime.ScriptEnvironment
 
isTrueScalar(Scalar) - Static method in class sleep.runtime.SleepUtils
check if the scalar is true using Sleep's definition of truth.
isYield() - Method in class sleep.runtime.ScriptEnvironment
 

K

key - Variable in class sleep.bridges.KeyValuePair
the key scalar
keys() - Method in interface sleep.runtime.ScalarHash
Returns all of the keys within the scalar hash.
KeyValuePair - Class in sleep.bridges
Arguments passed to functions with the form key => expression are available via the KeyValuePair object.
KeyValuePair(Scalar, Scalar) - Constructor for class sleep.bridges.KeyValuePair
Instantiates a key/value pair
KillFrame() - Method in class sleep.runtime.ScriptEnvironment
 

L

last - Variable in class sleep.engine.Block
our last step in this block
last - Variable in class sleep.runtime.ScriptEnvironment.Context
 
leaveToplevel() - Method in class sleep.runtime.ScriptVariables
called when a closure is exited, returns local var scope for later restoration if desired
line - Variable in class sleep.error.ScriptWarning
 
lineNo - Variable in class sleep.error.SyntaxError
 
lineNumber - Variable in class sleep.runtime.ScriptInstance.SleepStackElement
 
Loadable - Interface in sleep.interfaces
A loadable bridge is used to perform actions on scripts when they are loaded and unloaded.
loadContext(Stack, HashMap) - Method in class sleep.runtime.ScriptEnvironment
 
loaded - Variable in class sleep.runtime.ScriptInstance
true by default, indicates wether or not the script is loaded.
loadedScripts - Variable in class sleep.runtime.ScriptLoader
loaded scripts
loadScript(String, Block, Hashtable) - Method in class sleep.runtime.ScriptLoader
creates a Sleep script instance using the precompiled code, name, and shared environment.
loadScript(String, String, Hashtable) - Method in class sleep.runtime.ScriptLoader
loads the specified script
loadScript(String, InputStream) - Method in class sleep.runtime.ScriptLoader
loads a script from the specified inputstream
loadScript(String, InputStream, Hashtable) - Method in class sleep.runtime.ScriptLoader
loads a script from the specified input stream using the specified hashtable as a shared environment
loadScript(String) - Method in class sleep.runtime.ScriptLoader
Loads the specified script file
loadScript(String, Hashtable) - Method in class sleep.runtime.ScriptLoader
Loads the specified script file, uses the specified hashtable for the environment
loadScript(File, Hashtable) - Method in class sleep.runtime.ScriptLoader
Loads the specified script file, uses the specified hashtable for the environment
loadScript(File) - Method in class sleep.runtime.ScriptLoader
Loads the specified script file
loadScriptNoReference(String, Block, Hashtable) - Method in class sleep.runtime.ScriptLoader
creates a Sleep script instance using the precompiled code, name, and shared environment.
loadSerialized(File, Hashtable) - Method in class sleep.runtime.ScriptLoader
Load a serialized version of the script iff a serialized version exists, and its modification time is greater than the modification time of the script.
loadSerialized(String, InputStream, Hashtable) - Method in class sleep.runtime.ScriptLoader
Loads a serialized script from the specified input stream with the specified name
loadTime - Variable in class sleep.runtime.ScriptInstance
track the time this script was loaded
locals - Variable in class sleep.runtime.ScriptVariables
 
longValue() - Method in class sleep.runtime.Scalar
the long value of this scalar
longValue() - Method in interface sleep.runtime.ScalarType
convert the scalar to a long

M

makeSafe() - Method in class sleep.runtime.ScriptInstance
Call this function if you're sharing a script environment with other script instances.
marker - Variable in class sleep.error.SyntaxError
 
markFrame() - Method in class sleep.runtime.ScriptEnvironment
markFrame and cleanFrame are used to keep the sleep stack in good order after certain error conditions
marks - Variable in class sleep.runtime.ScriptVariables
 
message - Variable in class sleep.error.ScriptWarning
 
metadata - Variable in class sleep.runtime.ScriptEnvironment
 
metaStack - Variable in class sleep.runtime.ScriptEnvironment
 
modifyAllow - Variable in class sleep.runtime.ProxyIterator
 
moreHandlers - Variable in class sleep.runtime.ScriptEnvironment.Context
 
moreHandlers - Variable in class sleep.runtime.ScriptEnvironment
 

N

name - Variable in class sleep.engine.atoms.Check
 
name - Variable in class sleep.runtime.ScriptInstance
the name of this script
newInstance(Class, SleepClosure, ScriptInstance) - Static method in class sleep.runtime.SleepUtils
Creates a proxy instance of the specified class (limited to interfaces at this time) that is backed with the specified closure
newInstance(Class, Block, ScriptInstance) - Static method in class sleep.runtime.SleepUtils
Creates a proxy instance of the specified class (limited to interfaces at this time) that is backed with the specified block of code (made into a closure)
next() - Method in class sleep.runtime.ProxyIterator
 
normalize(int, int) - Static method in class sleep.bridges.BridgeUtilities
normalizes the index value based on the specified length
nullScalar - Static variable in class sleep.runtime.SleepUtils
a shared instance of the dreaded null scalar...

O

ObjectUtilities - Class in sleep.engine
This class is sort of the center of the HOES universe containing several methods for mapping between Sleep and Java and resolving which mappings make sense.
ObjectUtilities() - Constructor for class sleep.engine.ObjectUtilities
 
objectValue() - Method in class sleep.runtime.Scalar
the object value of this scalar
objectValue() - Method in interface sleep.runtime.ScalarType
convert the scalar to an object value *shrug*
openRead(InputStream) - Method in class sleep.bridges.io.IOObject
Initializes a binary reader (a DataInputStream) and a text reader (a BufferedReader) against this input stream.
openWrite(OutputStream) - Method in class sleep.bridges.io.IOObject
Initializes a binary writer (a DataOutputStream) and a text writer (a PrintWriter) against this input stream.
operate(String, ScriptInstance, Stack) - Method in interface sleep.interfaces.Operator
apply operator operatorName on the values in the stack.
Operator - Interface in sleep.interfaces
An operator in sleep parlance is anything used to operate on two variables inside of an expression.
out - Variable in class sleep.bridges.io.IOObject
 
owner - Variable in class sleep.runtime.ScriptEnvironment.ExceptionContext
 

P

parent - Variable in class sleep.runtime.ScriptInstance
 
ParseCode(String) - Static method in class sleep.runtime.SleepUtils
Parses the specified code into a runnable block.
ParserConfig - Class in sleep.parser
 
ParserConfig() - Constructor for class sleep.parser.ParserConfig
 
paths - Variable in class sleep.runtime.ScriptLoader
path to search for jar files imported using [import * from: *] syntax
pop() - Method in interface sleep.runtime.ScalarArray
remove the topmost element from the array
popClosureLevel() - Method in class sleep.runtime.ScriptVariables
discards the current closure variable scope
popExceptionContext() - Method in class sleep.runtime.ScriptEnvironment
 
popLocalLevel() - Method in class sleep.runtime.ScriptVariables
discards the current local variable scope, making the previous local scope the current local scope again
popSource() - Method in class sleep.runtime.ScriptEnvironment
remove the latest source information from the source stack
Predicate - Interface in sleep.interfaces
A predicate is an operator used inside of comparisons.
PredicateEnvironment - Interface in sleep.interfaces
Predicate environments are similar to normal keyword environments except instead of binding commands to an identifier they are bound to a predicate condition.
print(String) - Method in class sleep.bridges.io.IOObject
Prints out a line of text with no newline character appended
printErrors(OutputStream) - Method in exception sleep.error.YourCodeSucksException
print a nicely formatted version of the script errors to the specified stream
printLine(String) - Method in class sleep.bridges.io.IOObject
Prints out a line of text with a newline character appended
printProfileStatistics(OutputStream) - Method in class sleep.runtime.ScriptInstance
Dumps the profiler statistics to the specified stream
processScriptErrors(YourCodeSucksException) - Method in class sleep.console.ConsoleImplementation
a convienence method that formats and writes each syntax error to the proxy output
processScriptWarning(ScriptWarning) - Method in class sleep.console.ConsoleImplementation
 
processScriptWarning(ScriptWarning) - Method in interface sleep.error.RuntimeWarningWatcher
fired when a runtime warning has occured.
ProxyInterface - Class in sleep.engine
This class is used to mock an instance of a class that implements a specified Java interface using a Sleep function.
ProxyInterface(Function, ScriptInstance) - Constructor for class sleep.engine.ProxyInterface
 
ProxyIterator - Class in sleep.runtime
 
ProxyIterator(Iterator, boolean) - Constructor for class sleep.runtime.ProxyIterator
 
push(Scalar) - Method in interface sleep.runtime.ScalarArray
add an element onto the end of the array
pushClosureLevel(Variable) - Method in class sleep.runtime.ScriptVariables
pushes the specified variables into this closures level, once the closure has executed this should be popped
pushLocalLevel(Variable) - Method in class sleep.runtime.ScriptVariables
makes the specified variable container active for the local scope.
pushLocalLevel() - Method in class sleep.runtime.ScriptVariables
starts a new local variable scope.
pushSource(String) - Method in class sleep.runtime.ScriptEnvironment
push source information onto the source stack
putMetadata(Object, Object) - Method in class sleep.bridges.SleepClosure
put some value into the metadata store associated with this closure.
putScalar(String, Scalar) - Method in interface sleep.interfaces.Variable
put a scalar into this variable environment
putScalar(String, Scalar) - Method in class sleep.runtime.ScriptEnvironment
puts a scalar into this scripts environment (global scope)
putScalar(String, Scalar) - Method in class sleep.runtime.ScriptVariables
puts a scalar into the global scope

R

readCharacter() - Method in class sleep.bridges.io.IOObject
Reads in a character of text and returns as a string.
reader - Variable in class sleep.bridges.io.IOObject
 
readerb - Variable in class sleep.bridges.io.IOObject
 
readeru - Variable in class sleep.bridges.io.IOObject
 
readLine() - Method in class sleep.bridges.io.IOObject
Reads in a line of text
realIterator - Variable in class sleep.runtime.ProxyIterator
 
recordStackFrame(String, String, int) - Method in class sleep.runtime.ScriptInstance
Records a stack frame into this environments stack trace tracker thingie.
recordStackFrame(String, int) - Method in class sleep.runtime.ScriptInstance
Records a stack frame into this environments stack trace tracker thingie.
remove() - Method in class sleep.runtime.ProxyIterator
 
remove(Scalar) - Method in interface sleep.runtime.ScalarArray
remove all elements with the same identity as the specified scalar
remove(int) - Method in interface sleep.runtime.ScalarArray
remove an element at the specified index
remove(Scalar) - Method in interface sleep.runtime.ScalarHash
Removes the specified scalar from the hashmap.
removeScalar(String) - Method in interface sleep.interfaces.Variable
remove a scalar from this variable environment
removeScalar(Iterator, Scalar) - Static method in class sleep.runtime.SleepUtils
Iterates over the specified collection and removes all items that are the same as the specified scalar value.
removeWarningWatcher(RuntimeWarningWatcher) - Method in class sleep.runtime.ScriptInstance
Removes a runtime warning watcher listener
request - Variable in class sleep.runtime.ScriptEnvironment
 
resetEnvironment() - Method in class sleep.runtime.ScriptEnvironment
Resets the script environment to include clearing the return of all flags (including thrown exceptions)
rppl() - Method in class sleep.console.ConsoleImplementation
starts the console
run() - Method in class sleep.bridges.SleepClosure
"Safely" calls this closure.
run() - Method in class sleep.runtime.ScriptInstance
Executes this script, same as runScript() just here for Runnable compatability
runCode(Block, ScriptEnvironment) - Static method in class sleep.runtime.SleepUtils
"safely" run a snippet of code.
runCode(SleepClosure, String, ScriptInstance, Stack) - Static method in class sleep.runtime.SleepUtils
"safely" runs a closure.
runCode(Function, String, ScriptInstance, Stack) - Static method in class sleep.runtime.SleepUtils
"safely" runs a "Function" of code.
runCode(ScriptInstance, Block, HashMap) - Static method in class sleep.runtime.SleepUtils
"safely" run a snippet of code.
runCode(ScriptInstance, Block) - Static method in class sleep.runtime.SleepUtils
"safely" run a snippet of code.
runScript() - Method in class sleep.runtime.ScriptInstance
Executes this script, should be done first thing once a script is loaded
RuntimeWarningWatcher - Interface in sleep.error
Runtime errors are caught by sleep.
rv - Variable in class sleep.runtime.ScriptEnvironment
 

S

sameAs(Scalar) - Method in class sleep.runtime.Scalar
compares two scalars in terms of their identity.
Sanitizer(Object) - Static method in class sleep.taint.TaintUtils
Wraps the specified bridge in such a way that all results are considered sanitized (untainted).
saveContext() - Method in class sleep.runtime.ScriptEnvironment
 
saveSerialized(ScriptInstance) - Static method in class sleep.runtime.ScriptLoader
Saves a serialized version of the compiled script to scriptname.bin.
saveSerialized(ScriptInstance, OutputStream) - Static method in class sleep.runtime.ScriptLoader
Saves a serialized version of the ScriptInstance si to the specified output stream
Scalar - Class in sleep.runtime
A scalar is the universal data type for sleep variables.
Scalar() - Constructor for class sleep.runtime.Scalar
 
ScalarArray - Interface in sleep.runtime
This interface lets you implement your own data structure behind a scalar array.
scalarExists(String) - Method in interface sleep.interfaces.Variable
true if a scalar named key exists in this variable environment
ScalarHash - Interface in sleep.runtime
This interface lets you create your own scalar hash implementation.
scalarIterator() - Method in class sleep.bridges.SleepClosure
 
scalarIterator() - Method in interface sleep.runtime.ScalarArray
return an iterator
ScalarType - Interface in sleep.runtime
This interface makes it possible to create a new scalar type.
script - Variable in class sleep.engine.ProxyInterface
 
script - Variable in class sleep.error.ScriptWarning
 
script - Variable in class sleep.runtime.ScriptInstance
The compiled sleep code for this script, the ScriptLoader will set this value upon loading a script.
ScriptEnvironment - Class in sleep.runtime
This class contains methods for accessing the data stack, return value of a function, and the environment hashtable for a script.
ScriptEnvironment() - Constructor for class sleep.runtime.ScriptEnvironment
Not recommended that you instantiate a script environment in this way
ScriptEnvironment(Hashtable, ScriptInstance) - Constructor for class sleep.runtime.ScriptEnvironment
Instantiate a new script environment with the specified environment (can be shared), and the specified ScriptInstance
ScriptEnvironment.Context - Class in sleep.runtime
 
ScriptEnvironment.Context() - Constructor for class sleep.runtime.ScriptEnvironment.Context
 
ScriptEnvironment.ExceptionContext - Class in sleep.runtime
 
ScriptEnvironment.ExceptionContext() - Constructor for class sleep.runtime.ScriptEnvironment.ExceptionContext
 
ScriptInstance - Class in sleep.runtime
Every piece of information related to a loaded script.
ScriptInstance(Hashtable) - Constructor for class sleep.runtime.ScriptInstance
Constructs a script instance, if the parameter is null a default implementation will be used.
ScriptInstance(Variable, Hashtable) - Constructor for class sleep.runtime.ScriptInstance
Constructs a script instance, if either of the parameters are null a default implementation will be used.
ScriptInstance() - Constructor for class sleep.runtime.ScriptInstance
Constructs a new script instance
ScriptInstance.ProfilerStatistic - Class in sleep.runtime
A container for a profile statistic about a sleep function
ScriptInstance.ProfilerStatistic() - Constructor for class sleep.runtime.ScriptInstance.ProfilerStatistic
 
ScriptInstance.SleepStackElement - Class in sleep.runtime
A container for Sleep strack trace elements.
ScriptInstance.SleepStackElement() - Constructor for class sleep.runtime.ScriptInstance.SleepStackElement
 
scriptLoaded(ScriptInstance) - Method in class sleep.console.ConsoleImplementation
 
scriptLoaded(ScriptInstance) - Method in interface sleep.interfaces.Loadable
called when a script is loaded
ScriptLoader - Class in sleep.runtime
The ScriptLoader is a convienence container for instantiating and managing ScriptInstances.
ScriptLoader() - Constructor for class sleep.runtime.ScriptLoader
initializes the script loader
scripts - Variable in class sleep.runtime.ScriptLoader
loaded scripts except referable by key
scriptUnloaded(ScriptInstance) - Method in class sleep.console.ConsoleImplementation
 
scriptUnloaded(ScriptInstance) - Method in interface sleep.interfaces.Loadable
called when a script is unloaded
ScriptVariables - Class in sleep.runtime
Maintains variables and variable scopes for a script instance.
ScriptVariables() - Constructor for class sleep.runtime.ScriptVariables
Initializes this ScriptVariables container using a DefaultVariable object for default variable storage
ScriptVariables(Variable) - Constructor for class sleep.runtime.ScriptVariables
Initializes this class with your version of variable storage
ScriptWarning - Class in sleep.error
A package for all information related to a runtime script warning.
ScriptWarning(ScriptInstance, String, int) - Constructor for class sleep.error.ScriptWarning
 
ScriptWarning(ScriptInstance, String, int, boolean) - Constructor for class sleep.error.ScriptWarning
 
self - Variable in class sleep.runtime.ScriptEnvironment
the script instance that this is the environment for
sendEOF() - Method in class sleep.bridges.io.IOObject
Closes down the output streams effectively sending an end of file message to the reading end.
Sensitive(Object) - Static method in class sleep.taint.TaintUtils
Wraps the specified bridge in such a way that all values on current frame are checked for tainted values.
setCharset(String) - Method in class sleep.runtime.ScriptLoader
If charset conversion is enabled and charset is set, then the stream will be read using specified charset.
setCharsetConversion(boolean) - Method in class sleep.runtime.ScriptLoader
Java by default maps characters from an 8bit ascii file to an internal 32bit unicode representation.
setChoices(Check, Check) - Method in class sleep.engine.atoms.Check
Sets up the true and false choices, again this is handled by the sleep engine
setClosureVariables(SleepClosure, Variable) - Method in class sleep.runtime.ScriptVariables
returns the closure level variables for this specific script environment
setConsole(ScriptEnvironment, IOObject) - Static method in class sleep.bridges.io.IOObject
sets the stdin/stdout for this script environment.
setContextMetadata(Object, Object) - Method in class sleep.runtime.ScriptEnvironment
Use this function to save some meta data for this particular closure context, passing null for value will remove the key from the metadata for this context.
setDebugFlags(int) - Method in class sleep.runtime.ScriptInstance
set the debug flags for this script
setEncoding(String) - Method in class sleep.bridges.io.IOObject
set the charset to be used for all unicode aware reads/writes from/to this stream
setEnvironment(Hashtable) - Method in class sleep.runtime.ScriptEnvironment
Sets the environment Hashtable this script is to use.
setGlobalCache(boolean) - Method in class sleep.runtime.ScriptLoader
The Sleep script loader can optionally cache parsed script files once they are loaded.
setInfo(int) - Method in class sleep.engine.atoms.Check
Sets the line number in code where this check object occurs, again called by the sleep engine
setName(String) - Method in class sleep.runtime.ScriptInstance
Sets the name of this script
setParent(IOObject) - Method in class sleep.runtime.ScriptInstance
Sets up the parent of this script (in case it is being run via &fork()).
setProxy(ConsoleProxy) - Method in class sleep.console.ConsoleImplementation
Sets up the implementation of the consoles input/output facilities
setScalarLevel(String, Scalar, Variable) - Method in class sleep.runtime.ScriptVariables
Puts the specified scalar in a specific scope
setScriptVariables(ScriptVariables) - Method in class sleep.runtime.ScriptInstance
Sets the variable container to be used by this script
setSleepClasspath(String) - Static method in class sleep.parser.ParserConfig
Set the Sleep classpath.
setThread(Thread) - Method in class sleep.bridges.io.IOObject
set the thread used for this IOObject (currently used to allow a script to wait() on the threads completion)
setToken(Scalar) - Method in class sleep.bridges.io.IOObject
sets the scalar token associated with this IOObject.
setUnloaded() - Method in class sleep.runtime.ScriptInstance
Flag this script as unloaded
setValue(ScalarType) - Method in class sleep.runtime.Scalar
set the value of this scalar container to a scalar value of some type
setValue(ScalarArray) - Method in class sleep.runtime.Scalar
set the value of this scalar container to a scalar array
setValue(ScalarHash) - Method in class sleep.runtime.Scalar
set the value of this scalar container to a scalar hash
setValue(Scalar) - Method in class sleep.runtime.Scalar
clones the value from the specified scalar and gives this scalar a copy of the value
setVariables(Variable) - Method in class sleep.bridges.SleepClosure
Sets the variable environment for this closure
showDebugMessage(String) - Method in class sleep.runtime.ScriptEnvironment
fires this debug message via a runtime warning complete with line number of current step
size() - Method in interface sleep.runtime.ScalarArray
return the size of the array
sleep.bridges - package sleep.bridges
This package contains the default bridges distributed with sleep.
sleep.bridges.io - package sleep.bridges.io
 
sleep.console - package sleep.console
Integrating the Sleep Console
sleep.engine - package sleep.engine
 
sleep.engine.atoms - package sleep.engine.atoms
 
sleep.error - package sleep.error
 
sleep.interfaces - package sleep.interfaces
Interfaces for developing bridges.
sleep.parser - package sleep.parser
The parser package.
sleep.runtime - package sleep.runtime
 
sleep.taint - package sleep.taint
 
SLEEP_RELEASE - Static variable in class sleep.runtime.SleepUtils
A date stamp of this Sleep release in YYYYMMDD format
SLEEP_VERSION - Static variable in class sleep.runtime.SleepUtils
A string description of this Sleep release
SleepClosure - Class in sleep.bridges
The Sleep Closure class.
SleepClosure(ScriptInstance, Block) - Constructor for class sleep.bridges.SleepClosure
Creates a new Sleep Closure, with a brand new set of internal variables.
SleepClosure(ScriptInstance, Block, Variable) - Constructor for class sleep.bridges.SleepClosure
Creates a new Sleep Closure that uses the specified variable container for its internal variables
SleepUtils - Class in sleep.runtime
This class contains generalized utilities for instantiating/wrapping data into the sleep Scalar type.
SleepUtils() - Constructor for class sleep.runtime.SleepUtils
 
sort(Comparator) - Method in interface sleep.runtime.ScalarArray
sort this array with the specified comparator
source - Variable in class sleep.engine.Block
an identifier/tag/whatever identifying the source of this block (i.e.
source - Variable in class sleep.error.ScriptWarning
 
sourcefile - Variable in class sleep.runtime.ScriptInstance.SleepStackElement
 
sourceFiles - Variable in class sleep.runtime.ScriptInstance
list of source files associated with this script (to account for &include)
sources - Variable in class sleep.runtime.ScriptEnvironment
how many stacks does this damned class include?
stringValue() - Method in class sleep.runtime.Scalar
the string value of this scalar
sublist(int, int) - Method in interface sleep.runtime.ScalarArray
return a view into the array, ideally one that uses the same backing store
SyntaxError - Class in sleep.error
A class containing syntax error information.
SyntaxError(String, String, int) - Constructor for class sleep.error.SyntaxError
construct a syntax error object, but enough about me...
SyntaxError(String, String, int, String) - Constructor for class sleep.error.SyntaxError
construct a syntax error object, but enough about me...

T

taint(Scalar) - Static method in class sleep.taint.TaintUtils
taints the specified scalar (if it is a value scalar only).
taint(Stack) - Static method in class sleep.taint.TaintUtils
taints all of the Scalar values in the specified stack.
taintAll(Scalar) - Static method in class sleep.taint.TaintUtils
taints the specified scalar (bridge writers should call this on their scalars).
Tainter(Object) - Static method in class sleep.taint.TaintUtils
Wraps the specified bridge in such a way that all results are considered tainted.
TaintUtils - Class in sleep.taint
Sleep supports a mode where variables received from external sources are considered tainted.
TaintUtils() - Constructor for class sleep.taint.TaintUtils
 
thread - Variable in class sleep.bridges.io.IOObject
 
ticks - Variable in class sleep.runtime.ScriptInstance.ProfilerStatistic
the total number of ticks consumed by this function call
toByteArrayNoConversion(String) - Static method in class sleep.bridges.BridgeUtilities
converts the specified string to an array of bytes (useful as Sleep stores byte arrays to strings)
token - Variable in class sleep.bridges.io.IOObject
 
toSleepFile(String, ScriptInstance) - Static method in class sleep.bridges.BridgeUtilities
adjusts the file argument to accomodate for the current working directory
toString() - Method in class sleep.bridges.KeyValuePair
Return a string representation of this key/value pair
toString() - Method in class sleep.bridges.SleepClosure
Information about this closure in the form of &closure[:]#
toString(String) - Method in class sleep.engine.atoms.Check
Converts this object to a string, used by the sleep engine for constructing an AST like thing
toString() - Method in class sleep.engine.atoms.Check
Returns a string representation of this object
toString(String) - Method in class sleep.engine.Block
 
toString() - Method in class sleep.engine.Block
Returns a string representation of the Abstract Syntax Tree (AST).
toString() - Method in class sleep.engine.ProxyInterface
Returns a string description of this proxy interface
toString() - Method in class sleep.error.ScriptWarning
returns a nicely formatted string representation of this runtime warning.
toString() - Method in exception sleep.error.YourCodeSucksException
Returns a simple string representation of the errors within this exception
toString() - Method in class sleep.runtime.Scalar
 
toString() - Method in interface sleep.runtime.ScalarType
convert the scalar to a string
toString() - Method in class sleep.runtime.ScriptEnvironment
 
toString() - Method in class sleep.runtime.ScriptInstance.ProfilerStatistic
returns a string in the form of (total time used in seconds)s (total calls made) @(line number) (function description)
toString() - Method in class sleep.runtime.ScriptInstance.SleepStackElement
 
toStringGeneric() - Method in class sleep.bridges.SleepClosure
Returns a generic string version of this closure without id information
total() - Method in class sleep.runtime.ScriptInstance
return the total number of ticks this script has spent processing
touch(String, long) - Method in class sleep.runtime.ScriptLoader
nudge the cache with the last modified time of the specified script.
trace - Variable in class sleep.error.ScriptWarning
 

U

unloadScript(String) - Method in class sleep.runtime.ScriptLoader
unload a script
unloadScript(ScriptInstance) - Method in class sleep.runtime.ScriptLoader
unload a script
untaint(Scalar) - Static method in class sleep.taint.TaintUtils
untaints the specified scalar.

V

value - Variable in class sleep.bridges.KeyValuePair
the value scalar
value - Variable in class sleep.runtime.Scalar
 
Variable - Interface in sleep.interfaces
A variable bridge is a container for storing scalars.
variables - Variable in class sleep.runtime.ScriptInstance
The script variables which contains all of the variable information for a script
varname - Variable in class sleep.runtime.ScriptEnvironment.ExceptionContext
 

W

wait(ScriptEnvironment, long) - Method in class sleep.bridges.io.IOObject
 
watchers - Variable in class sleep.runtime.ScriptInstance
A list of listeners watching for a runtime error
writerb - Variable in class sleep.bridges.io.IOObject
 
writeru - Variable in class sleep.bridges.io.IOObject
 

Y

YourCodeSucksException - Exception in sleep.error
Syntax errors are a reality of programming.
YourCodeSucksException(LinkedList) - Constructor for exception sleep.error.YourCodeSucksException
Initialize the exception (sleep parser)

A B C D E F G H I K L M N O P R S T U V W Y