Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- advance(String) - Method in class org.dellroad.javabox.LineAndColumn
-
Update the offsets by advancing through the given string.
- allSuccessful() - Static method in interface org.dellroad.javabox.ResultChecker
-
Create an instance that verifies that all
SnippetOutcomes are successful.
B
- box - Variable in class org.dellroad.javabox.JavaBoxExecutionControl
- box() - Method in record class org.dellroad.javabox.Control.ContainerContext
-
Returns the value of the
boxrecord component. - box() - Method in class org.dellroad.javabox.ScriptResult
-
Get the associated
JavaBox. - box() - Method in interface org.dellroad.javabox.SnippetOutcome
-
Get the associated
JavaBox. - build() - Method in class org.dellroad.javabox.Config.Builder
-
Build the
Config. - builder() - Static method in record class org.dellroad.javabox.Config
-
Create a new
Config.Builder.
C
- check(ScriptResult) - Method in interface org.dellroad.javabox.ResultChecker
-
Apply this instance to the given result.
- checkSnippets(BiConsumer<? super ScriptResult, ? super Integer>) - Static method in interface org.dellroad.javabox.ResultChecker
-
Create an instance that verifies that every
SnippetOutcomes meets some requirement. - close() - Method in class org.dellroad.javabox.JavaBox
-
Close this instance.
- columnOffset() - Method in class org.dellroad.javabox.LineAndColumn
-
Get the column offset.
- CompilerError - Record Class in org.dellroad.javabox
-
Captures a compilation error.
- CompilerError(LineAndColumn, String) - Constructor for record class org.dellroad.javabox.CompilerError
-
Creates an instance of a
CompilerErrorrecord class. - compilerErrors() - Method in interface org.dellroad.javabox.SnippetOutcome.CompilerErrors
-
Get the compiler errors that caused compilation to fail.
- Config - Record Class in org.dellroad.javabox
-
Configuration object for
JavaBoxinstances. - Config(JShell.Builder, ClassLoader, List<Control>) - Constructor for record class org.dellroad.javabox.Config
-
Creates an instance of a
Configrecord class. - Config.Builder - Class in org.dellroad.javabox
-
Builder for
Configinstances. - containerContext() - Method in record class org.dellroad.javabox.Control.ExecutionContext
-
Returns the value of the
containerContextrecord component. - ContainerContext(JavaBox, Control, Object) - Constructor for record class org.dellroad.javabox.Control.ContainerContext
-
Creates an instance of a
ContainerContextrecord class. - context() - Method in record class org.dellroad.javabox.Control.ContainerContext
-
Returns the value of the
contextrecord component. - context() - Method in record class org.dellroad.javabox.Control.ExecutionContext
-
Returns the value of the
contextrecord component. - control() - Method in record class org.dellroad.javabox.Control.ContainerContext
-
Returns the value of the
controlrecord component. - Control - Interface in org.dellroad.javabox
-
Monitors, modifies, and/or restricts the execution of scripts running in a
JavaBox. - Control.ContainerContext - Record Class in org.dellroad.javabox
- Control.ExecutionContext - Record Class in org.dellroad.javabox
-
The per-execution context associated with a
Control. - controls() - Method in record class org.dellroad.javabox.Config
-
Returns the value of the
controlsrecord component. - ControlViolationException - Exception Class in org.dellroad.javabox
-
Thrown when a script does something that exceeds imposed limits or otherwise is not allowed by a configured
Control. - ControlViolationException(String) - Constructor for exception class org.dellroad.javabox.ControlViolationException
- ControlViolationException(String, Throwable) - Constructor for exception class org.dellroad.javabox.ControlViolationException
- ControlViolationException(Throwable) - Constructor for exception class org.dellroad.javabox.ControlViolationException
- createLocalExecutionControl(MemoryLoaderDelegate) - Method in class org.dellroad.javabox.JavaBoxExecutionControlProvider
D
- delegateLoader() - Method in record class org.dellroad.javabox.Config
-
Returns the value of the
delegateLoaderrecord component.
E
- enterContext() - Method in class org.dellroad.javabox.JavaBoxExecutionControl
- equals(Object) - Method in record class org.dellroad.javabox.CompilerError
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class org.dellroad.javabox.Config
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class org.dellroad.javabox.Control.ContainerContext
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class org.dellroad.javabox.Control.ExecutionContext
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in class org.dellroad.javabox.LineAndColumn
- errorMessage() - Method in record class org.dellroad.javabox.CompilerError
-
Returns the value of the
errorMessagerecord component. - exception() - Method in interface org.dellroad.javabox.SnippetOutcome.HasException
-
Get the exception thrown.
- execute(String) - Method in class org.dellroad.javabox.JavaBox
-
Execute the given script in this container.
- ExecutionContext(Control.ContainerContext, Object) - Constructor for record class org.dellroad.javabox.Control.ExecutionContext
-
Creates an instance of a
ExecutionContextrecord class. - executionContextFor(Class<? extends Control>) - Static method in class org.dellroad.javabox.JavaBox
-
Obtain the execution context associated with the specified
Controlclass and the script execution occurring in the current thread.
F
- finishExecution(Control.ExecutionContext, Object, Throwable) - Method in interface org.dellroad.javabox.Control
-
Notification that the execution of a script snippet has finished, either successfully or by throwing an exception.
- finishingExecution(Object, Throwable) - Method in class org.dellroad.javabox.JavaBox
-
Subclass hook invoked when finishing script execution.
G
- getConfig() - Method in class org.dellroad.javabox.JavaBox
-
Get the
Configassociated with this instance. - getCurrent() - Static method in class org.dellroad.javabox.JavaBox
-
Get the
JavaBoxinstance associated with the current thread. - getJShell() - Method in class org.dellroad.javabox.JavaBox
-
Get the
JShellinstanced associated with this container. - getVariable(String) - Method in class org.dellroad.javabox.JavaBox
-
Get the value of a variable in this container.
H
- hashCode() - Method in record class org.dellroad.javabox.CompilerError
-
Returns a hash code value for this object.
- hashCode() - Method in record class org.dellroad.javabox.Config
-
Returns a hash code value for this object.
- hashCode() - Method in record class org.dellroad.javabox.Control.ContainerContext
-
Returns a hash code value for this object.
- hashCode() - Method in record class org.dellroad.javabox.Control.ExecutionContext
-
Returns a hash code value for this object.
- hashCode() - Method in class org.dellroad.javabox.LineAndColumn
I
- initCause(Throwable) - Method in exception class org.dellroad.javabox.ControlViolationException
- initCause(Throwable) - Method in exception class org.dellroad.javabox.JavaBoxException
- initial() - Static method in class org.dellroad.javabox.LineAndColumn
-
Obtain an initial instance with all offsets set to zero.
- initialize() - Method in class org.dellroad.javabox.JavaBox
-
Initialize this instance.
- initialize(JavaBox) - Method in interface org.dellroad.javabox.Control
-
Initialize this control for the given
JavaBoxand return any associated private context. - interrupt() - Method in class org.dellroad.javabox.JavaBox
-
Interrupt the current script execution, if any.
- isClosed() - Method in class org.dellroad.javabox.JavaBox
-
Determine if this instance is closed.
- isExecuting() - Method in class org.dellroad.javabox.JavaBox
-
Determine if this instance is currently executing a script.
- isInitialized() - Method in class org.dellroad.javabox.JavaBox
-
Determine if this instance has been initialized.
- isSuccessful() - Method in class org.dellroad.javabox.ScriptResult
-
Determine whether the script exeuction was successful.
- isSuspended() - Method in class org.dellroad.javabox.JavaBox
-
Determine if this instance has a suspended script.
J
- JavaBox - Class in org.dellroad.javabox
-
A container for scripts written in the Java language.
- JavaBox(Config) - Constructor for class org.dellroad.javabox.JavaBox
-
Constructor.
- JavaBoxException - Exception Class in org.dellroad.javabox
-
Thrown when some unexpected error occurs during a
JavaBoxoperation. - JavaBoxException(String) - Constructor for exception class org.dellroad.javabox.JavaBoxException
- JavaBoxException(String, Throwable) - Constructor for exception class org.dellroad.javabox.JavaBoxException
- JavaBoxException(Throwable) - Constructor for exception class org.dellroad.javabox.JavaBoxException
- JavaBoxExecutionControl - Class in org.dellroad.javabox
-
The
LocalExecutionControlused byJavaBoxitself. - JavaBoxExecutionControl(LoaderDelegate) - Constructor for class org.dellroad.javabox.JavaBoxExecutionControl
-
Constructor.
- JavaBoxExecutionControlProvider - Class in org.dellroad.javabox
-
The
LocalContextExecutionControlProviderused byJavaBox. - JavaBoxExecutionControlProvider() - Constructor for class org.dellroad.javabox.JavaBoxExecutionControlProvider
- jshellBuilder() - Method in record class org.dellroad.javabox.Config
-
Returns the value of the
jshellBuilderrecord component.
L
- lastOutcome() - Method in class org.dellroad.javabox.ScriptResult
-
Get the outcome of the last
Snippetwhose execution was attempted. - leaveContext(Object, Throwable) - Method in class org.dellroad.javabox.JavaBoxExecutionControl
- LineAndColumn - Class in org.dellroad.javabox
-
Represents a character offset into a
String, along with associated line and column offsets. - lineCol() - Method in record class org.dellroad.javabox.CompilerError
-
Returns the value of the
lineColrecord component. - lineOffset() - Method in class org.dellroad.javabox.LineAndColumn
-
Get the line offset.
- load(ExecutionControl.ClassBytecodes[]) - Method in class org.dellroad.javabox.JavaBoxExecutionControl
M
- modifyBytecode(ClassDesc, byte[]) - Method in interface org.dellroad.javabox.Control
-
Apply this control to the given class which was generated from a script.
N
- name() - Method in class org.dellroad.javabox.JavaBoxExecutionControlProvider
- NAME - Static variable in class org.dellroad.javabox.JavaBoxExecutionControlProvider
O
- offset() - Method in class org.dellroad.javabox.LineAndColumn
-
Get the overall character offset.
- offset() - Method in interface org.dellroad.javabox.SnippetOutcome
-
Get the position within the original script source of the
SnippetOutcome.source()associated with this instance. - org.dellroad.javabox - package org.dellroad.javabox
- org.dellroad.javabox.core - module org.dellroad.javabox.core
P
- parameter() - Method in interface org.dellroad.javabox.SnippetOutcome.Suspended
-
Get the parameter that was passed to
JavaBox.suspend().
R
- result() - Method in exception class org.dellroad.javabox.ResultCheckerException
-
Get the
ScriptResultwhich generated this exception. - ResultChecker - Interface in org.dellroad.javabox
-
A checker for
ScriptResults that imposes some set of requirements that must be satisfied. - ResultCheckerException - Exception Class in org.dellroad.javabox
-
Exception thrown by a
ResultCheckerwhen a requirement is violated. - ResultCheckerException(ScriptResult, int, String) - Constructor for exception class org.dellroad.javabox.ResultCheckerException
-
Constructor.
- ResultCheckerException(ScriptResult, int, String, Throwable) - Constructor for exception class org.dellroad.javabox.ResultCheckerException
-
Constructor.
- ResultCheckerException(ScriptResult, String) - Constructor for exception class org.dellroad.javabox.ResultCheckerException
-
Constructor for exceptions that are not specific to a single snippet.
- ResultCheckerException(ScriptResult, String, Throwable) - Constructor for exception class org.dellroad.javabox.ResultCheckerException
-
Constructor for exceptions that are not specific to a single snippet.
- resume(Object) - Method in class org.dellroad.javabox.JavaBox
-
Resume this instance's suspended script.
- returns(Class<?>, boolean) - Static method in interface org.dellroad.javabox.ResultChecker
-
Create an instance that verifies that the last
SnippetOutcomewas a successful expression returning a value having the specified type. - returnValue() - Method in interface org.dellroad.javabox.SnippetOutcome.SuccessfulWithValue
-
Get the value returned from the snippet's execution.
- returnValue(Class<T>) - Method in class org.dellroad.javabox.ScriptResult
-
Convenience method to get the return value from a script's final snippet.
S
- ScriptResult - Class in org.dellroad.javabox
-
The result from executing a script in a
JavaBox. - setVariable(String, Object) - Method in class org.dellroad.javabox.JavaBox
-
Declare and assign a variable in this container.
- setVariable(String, String, Object) - Method in class org.dellroad.javabox.JavaBox
-
Declare and assign a variable in this container.
- shutdown(Control.ContainerContext) - Method in interface org.dellroad.javabox.Control
-
Shutdown this control for the given
JavaBox. - snippet() - Method in interface org.dellroad.javabox.SnippetOutcome.HasSnippet
-
Get the associated snippet.
- snippetIndex() - Method in exception class org.dellroad.javabox.ResultCheckerException
-
Get the index of the snippet that generated this exception.
- SnippetOutcome - Interface in org.dellroad.javabox
- SnippetOutcome.CompilerErrors - Interface in org.dellroad.javabox
-
Indicates failure due to one or more compiler errors.
- SnippetOutcome.CompilerSemanticErrors - Interface in org.dellroad.javabox
-
Indicates failure due to one or more compiler semantic errors.
- SnippetOutcome.CompilerSyntaxErrors - Interface in org.dellroad.javabox
-
Indicates failure due to one or more compiler parsing/syntax errors.
- SnippetOutcome.ControlViolation - Interface in org.dellroad.javabox
-
Indicates that the bytecode generated by the snippet could not be loaded because it violated some
Control. - SnippetOutcome.ExceptionThrown - Interface in org.dellroad.javabox
-
Indicates an exception was thrown during the execution of the snippet.
- SnippetOutcome.HaltsScript - Interface in org.dellroad.javabox
-
Implemented by
SnippetOutcomes that will cause a script to stop executing. - SnippetOutcome.HasException<T> - Interface in org.dellroad.javabox
-
Implemented by
SnippetOutcomes for which there is an associated exception. - SnippetOutcome.HasSnippet - Interface in org.dellroad.javabox
-
Implemented by
SnippetOutcomes for which enough progress was made to define a JShellSnippet. - SnippetOutcome.Interrupted - Interface in org.dellroad.javabox
-
Indicates that the snippet's execution was interrupted.
- SnippetOutcome.Overwritten - Interface in org.dellroad.javabox
-
Indicates that a declaration was successfully compiled, but the declaration was overwritten by a later snippet in the same source.
- SnippetOutcome.Successful - Interface in org.dellroad.javabox
-
Indicates a successful outcome.
- SnippetOutcome.SuccessfulNoValue - Interface in org.dellroad.javabox
-
Indicates a successful outcome for which no value was returned, e.g., the invocation of a void method, the declaration for which no unresolved references remain, etc.
- SnippetOutcome.SuccessfulWithValue - Interface in org.dellroad.javabox
-
Indicates a successful outcome for which some value was returned, e.g., an evaluated expression or the invocation of a non-void method.
- SnippetOutcome.Suspended - Interface in org.dellroad.javabox
-
Indicates that the snippet invoked
JavaBox.suspend(). - SnippetOutcome.UnresolvedReferences - Interface in org.dellroad.javabox
-
Indicates that a declaration was successful but it contained unresolved references and those references were not resolved by any subsequent snippets in the same source.
- snippetOutcomes() - Method in class org.dellroad.javabox.ScriptResult
-
Get the outcomes of the individual JShell
Snippets created from the script. - source() - Method in class org.dellroad.javabox.ScriptResult
-
Get the original script source.
- source() - Method in interface org.dellroad.javabox.SnippetOutcome
-
Get the source code of the snippet whose outcome is represented by this instance.
- startExecution(Control.ContainerContext) - Method in interface org.dellroad.javabox.Control
-
Notification that the execution of a script snippet has started.
- startingExecution() - Method in class org.dellroad.javabox.JavaBox
-
Subclass hook invoked when starting script execution.
- suspend(Object) - Static method in class org.dellroad.javabox.JavaBox
-
Suspend the script executing in the current thread.
T
- toString() - Method in record class org.dellroad.javabox.CompilerError
-
Format this instance like
"12:34: continue outside of loop". - toString() - Method in record class org.dellroad.javabox.Config
-
Returns a string representation of this record class.
- toString() - Method in record class org.dellroad.javabox.Control.ContainerContext
-
Returns a string representation of this record class.
- toString() - Method in record class org.dellroad.javabox.Control.ExecutionContext
-
Returns a string representation of this record class.
- toString() - Method in class org.dellroad.javabox.LineAndColumn
V
- valueStringWithContext(Object) - Method in class org.dellroad.javabox.JavaBoxExecutionControl
- variableValue() - Static method in class org.dellroad.javabox.JavaBox
-
Obtain the value of a variable being set by
setVariable().
W
- withControl(Control) - Method in class org.dellroad.javabox.Config.Builder
- withControls(List<Control>) - Method in class org.dellroad.javabox.Config.Builder
-
Configure the list of
Controls. - withDelegateLoader(ClassLoader) - Method in class org.dellroad.javabox.Config.Builder
-
Configure the
ClassLoaderto be used as the delegate loader of the loader that loads the classes generated for applied scripts. - withJShellBuilder(JShell.Builder) - Method in class org.dellroad.javabox.Config.Builder
-
Provide a custom
JShell.Builderto be used to create theJShellinstance. - withJShellMods(Consumer<? super JShell.Builder>) - Method in class org.dellroad.javabox.Config.Builder
-
Apply a modification to the
JShell.Builderthat will be used to create theJShellinstance.
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form