AutoCloseable
, ExecutionControl
JdiDefaultExecutionControl
public abstract class JdiExecutionControl extends StreamingExecutionControl implements ExecutionControl
ExecutionControl
.ExecutionControl.ClassBytecodes, ExecutionControl.ClassInstallException, ExecutionControl.EngineTerminationException, ExecutionControl.ExecutionControlException, ExecutionControl.InternalException, ExecutionControl.NotImplementedException, ExecutionControl.ResolutionException, ExecutionControl.RunException, ExecutionControl.StoppedException, ExecutionControl.UserException
Modifier | Constructor | Description |
---|---|---|
protected |
JdiExecutionControl(ObjectOutput out,
ObjectInput in) |
Create an instance.
|
Modifier and Type | Method | Description |
---|---|---|
void |
redefine(ExecutionControl.ClassBytecodes[] cbcs) |
Redefine the specified classes.
|
protected com.sun.jdi.ReferenceType |
referenceType(com.sun.jdi.VirtualMachine vm,
String name) |
Returns the JDI
ReferenceType corresponding to the specified
class name. |
protected abstract com.sun.jdi.VirtualMachine |
vm() |
Returns the JDI
VirtualMachine instance. |
addToClasspath, close, extensionCommand, generate, generate, invoke, load, stop, varValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addToClasspath, close, extensionCommand, invoke, load, stop, varValue
protected JdiExecutionControl(ObjectOutput out, ObjectInput in)
out
- the output from the remote agentin
- the input to the remote agentprotected abstract com.sun.jdi.VirtualMachine vm() throws ExecutionControl.EngineTerminationException
VirtualMachine
instance.ExecutionControl.EngineTerminationException
- if the VM is dead/disconnectedpublic void redefine(ExecutionControl.ClassBytecodes[] cbcs) throws ExecutionControl.ClassInstallException, ExecutionControl.EngineTerminationException
VirtualMachine.redefineClasses(java.util.Map)
.
It will be unsuccessful if
the signature of the class has changed (see the JDI spec). The
JShell-core is designed to adapt to unsuccessful redefine.redefine
in interface ExecutionControl
redefine
in class StreamingExecutionControl
cbcs
- the class name and bytecodes to redefineExecutionControl.ClassInstallException
- exception occurred redefining the classes,
some or all were not redefinedExecutionControl.EngineTerminationException
- the execution engine has terminatedprotected com.sun.jdi.ReferenceType referenceType(com.sun.jdi.VirtualMachine vm, String name)
ReferenceType
corresponding to the specified
class name.vm
- the current JDI VirtualMachine
as returned by
vm()
name
- the class name to look-upReferenceType
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-9b161-1