public abstract class JDIExecutionControl extends StreamingExecutionControl implements ExecutionControl
ExecutionControl
ExecutionControl.ClassBytecodes, ExecutionControl.ClassInstallException, ExecutionControl.EngineTerminationException, ExecutionControl.ExecutionControlException, ExecutionControl.Generator, ExecutionControl.InternalException, ExecutionControl.NotImplementedException, ExecutionControl.ResolutionException, ExecutionControl.RunException, ExecutionControl.StoppedException, ExecutionControl.UserException
Modifier | Constructor and Description |
---|---|
protected |
JDIExecutionControl(ObjectOutput out,
ObjectInput in)
Create an instance.
|
Modifier and Type | Method and 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, invoke, load, setClasspath, stop, varValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addToClasspath, close, extensionCommand, invoke, load, setClasspath, 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
Copyright © 2015, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-07-19-140351.robert.dev