AutoCloseable
, 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.InternalException, ExecutionControl.NotImplementedException, ExecutionControl.ResolutionException, ExecutionControl.RunException, ExecutionControl.StoppedException, ExecutionControl.UserException
Constructor | 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 | Description |
---|---|---|
protected void |
clientCodeEnter() |
Marks entry into user code.
|
protected void |
clientCodeLeave() |
Marks departure from user code.
|
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, throwConvertedInvocationException, throwConvertedOtherException, valueString, varValue
generate, generate
public LocalExecutionControl(LoaderDelegate loaderDelegate)
loaderDelegate
- the delegate to handle loading classespublic LocalExecutionControl()
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
Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 2015, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-Ubuntu+0-9b158-1