ExecutionControl
public class LocalExecutionControl extends DirectExecutionControl
ExecutionControl
which executes
in the same JVM as the JShell-core.ExecutionControl.ClassBytecodes, ExecutionControl.ClassInstallException, ExecutionControl.EngineTerminationException, ExecutionControl.ExecutionControlException, ExecutionControl.Generator, ExecutionControl.InternalException, ExecutionControl.NotImplementedException, ExecutionControl.ResolutionException, ExecutionControl.RunException, ExecutionControl.StoppedException, ExecutionControl.UserException
Constructor and Description |
---|
LocalExecutionControl()
Create an instance using the default class loading.
|
LocalExecutionControl(LoaderDelegate loaderDelegate)
Creates an instance, delegating loader operations to the specified
delegate.
|
Modifier and Type | Method and Description |
---|---|
protected void |
clientCodeEnter()
Marks entry into user code.
|
protected void |
clientCodeLeave()
Marks departure from user code.
|
static ExecutionControl.Generator |
create()
Creates a local ExecutionControl instance.
|
protected String |
invoke(Method doitMethod)
Invoke the specified "doit-method", a static method with no parameters.
|
void |
stop()
Interrupts a running invoke.
|
addToClasspath, close, extensionCommand, findClass, invoke, load, redefine, setClasspath, throwConvertedInvocationException, throwConvertedOtherException, valueString, varValue
public LocalExecutionControl()
public LocalExecutionControl(LoaderDelegate loaderDelegate)
loaderDelegate
- the delegate to handle loading classespublic static ExecutionControl.Generator create()
protected String invoke(Method doitMethod) throws Exception
DirectExecutionControl
DirectExecutionControl.invoke(java.lang.String, java.lang.String)
in this class will call this to invoke.invoke
in class DirectExecutionControl
doitMethod
- the Method to invokeException
- any exceptions thrown by
Method.invoke(Object, Object...)
or any ExecutionControl.ExecutionControlException
to pass-through.public void stop() throws ExecutionControl.EngineTerminationException, ExecutionControl.InternalException
DirectExecutionControl
Not supported.
stop
in interface ExecutionControl
stop
in class DirectExecutionControl
ExecutionControl.EngineTerminationException
- the execution engine has terminatedExecutionControl.InternalException
- an internal problem occurredprotected void clientCodeEnter()
DirectExecutionControl
clientCodeEnter
in class DirectExecutionControl
protected void clientCodeLeave()
DirectExecutionControl
clientCodeLeave
in class DirectExecutionControl
Copyright © 2015, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-09-03-162606.buildd.src