Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/MirrorImpl.java')
-rw-r--r--org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/MirrorImpl.java348
1 files changed, 214 insertions, 134 deletions
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/MirrorImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/MirrorImpl.java
index 4aae56ee4..ecdd3f890 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/MirrorImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/MirrorImpl.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.jdi.internal;
-
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -38,47 +37,56 @@ import com.sun.jdi.VMOutOfMemoryException;
import com.sun.jdi.VirtualMachine;
/**
- * this class implements the corresponding interfaces
- * declared by the JDI specification. See the com.sun.jdi package
- * for more information.
- *
+ * this class implements the corresponding interfaces declared by the JDI
+ * specification. See the com.sun.jdi package for more information.
+ *
*/
public class MirrorImpl implements Mirror {
-
+
/** Description of Mirror object. */
protected String fDescription;
/** Virtual Machine of Mirror object. */
private VirtualMachineImpl fVirtualMachineImpl;
- /** VerboseWriter where verbose info is written to, null if no verbose must be given. */
+ /**
+ * VerboseWriter where verbose info is written to, null if no verbose must
+ * be given.
+ */
protected VerboseWriter fVerboseWriter = null;
- /** True if a Jdwp request has been sent to the VM and the response is not yet (fully) processed. */
+ /**
+ * True if a Jdwp request has been sent to the VM and the response is not
+ * yet (fully) processed.
+ */
private boolean fPendingJdwpRequest = false;
-
+
/**
- * Constructor only to be used by Virtual Machine objects: stores description of Mirror object and Virtual Machine.
- */
+ * Constructor only to be used by Virtual Machine objects: stores
+ * description of Mirror object and Virtual Machine.
+ */
public MirrorImpl(String description) {
fDescription = description;
- fVirtualMachineImpl = (VirtualMachineImpl)this;
- PrintWriter writer = ((VirtualMachineManagerImpl)org.eclipse.jdi.Bootstrap.virtualMachineManager()).verbosePrintWriter();
+ fVirtualMachineImpl = (VirtualMachineImpl) this;
+ PrintWriter writer = ((VirtualMachineManagerImpl) org.eclipse.jdi.Bootstrap
+ .virtualMachineManager()).verbosePrintWriter();
if (writer != null)
fVerboseWriter = new VerboseWriter(writer);
}
/**
* Constructor stores description of Mirror object and its Virtual Machine.
- */
+ */
public MirrorImpl(String description, VirtualMachineImpl virtualMachineImpl) {
fVirtualMachineImpl = virtualMachineImpl;
fDescription = description;
- PrintWriter writer = ((VirtualMachineManagerImpl)org.eclipse.jdi.Bootstrap.virtualMachineManager()).verbosePrintWriter();
+ PrintWriter writer = ((VirtualMachineManagerImpl) org.eclipse.jdi.Bootstrap
+ .virtualMachineManager()).verbosePrintWriter();
if (writer != null)
fVerboseWriter = new VerboseWriter(writer);
}
-
+
/**
* @return Returns description of Mirror object.
*/
+ @Override
public String toString() {
return fDescription;
}
@@ -105,12 +113,15 @@ public class MirrorImpl implements Mirror {
fVerboseWriter.println("Received event set"); //$NON-NLS-1$
fVerboseWriter.println("length", commandPacket.getLength()); //$NON-NLS-1$
fVerboseWriter.println("id", commandPacket.getId()); //$NON-NLS-1$
- fVerboseWriter.println("flags", commandPacket.getFlags(), JdwpPacket.getFlagMap()); //$NON-NLS-1$
- fVerboseWriter.println("command set", (byte)(commandPacket.getCommand() >>> 8)); //$NON-NLS-1$
- fVerboseWriter.println("command", (byte)commandPacket.getCommand()); //$NON-NLS-1$
+ fVerboseWriter.println(
+ "flags", commandPacket.getFlags(), JdwpPacket.getFlagMap()); //$NON-NLS-1$
+ fVerboseWriter.println(
+ "command set", (byte) (commandPacket.getCommand() >>> 8)); //$NON-NLS-1$
+ fVerboseWriter
+ .println("command", (byte) commandPacket.getCommand()); //$NON-NLS-1$
}
}
-
+
/**
* Processing after each Jdwp Event.
*/
@@ -120,17 +131,17 @@ public class MirrorImpl implements Mirror {
fVerboseWriter.flush();
}
}
-
+
/**
- * Processing before each Jdwp request.
- * Note that this includes building the request message and parsing the response.
+ * Processing before each Jdwp request. Note that this includes building the
+ * request message and parsing the response.
*/
public void initJdwpRequest() {
if (fVerboseWriter != null) {
fVerboseWriter.gotoPosition(6);
}
}
-
+
/**
* Writes command packet header if verbose is on.
*/
@@ -144,13 +155,14 @@ public class MirrorImpl implements Mirror {
fVerboseWriter.println(")"); //$NON-NLS-1$
fVerboseWriter.println("length", commandPacket.getLength()); //$NON-NLS-1$
fVerboseWriter.println("id", commandPacket.getId()); //$NON-NLS-1$
- fVerboseWriter.println("flags", commandPacket.getFlags(), JdwpPacket.getFlagMap()); //$NON-NLS-1$
- fVerboseWriter.println("command set", (byte)(command >>> 8)); //$NON-NLS-1$
- fVerboseWriter.println("command", (byte)command); //$NON-NLS-1$
+ fVerboseWriter.println(
+ "flags", commandPacket.getFlags(), JdwpPacket.getFlagMap()); //$NON-NLS-1$
+ fVerboseWriter.println("command set", (byte) (command >>> 8)); //$NON-NLS-1$
+ fVerboseWriter.println("command", (byte) command); //$NON-NLS-1$
fVerboseWriter.gotoPosition(currentPosition);
}
}
-
+
/**
* Processing after each Jdwp Request.
*/
@@ -161,9 +173,10 @@ public class MirrorImpl implements Mirror {
}
fPendingJdwpRequest = false;
}
-
+
/**
* Performs a VM request.
+ *
* @return Returns reply data.
*/
public JdwpReplyPacket requestVM(int command, byte[] outData) {
@@ -174,7 +187,8 @@ public class MirrorImpl implements Mirror {
fPendingJdwpRequest = true;
writeVerboseCommandPacketHeader(commandPacket);
- JdwpReplyPacket reply = fVirtualMachineImpl.packetReceiveManager().getReply(commandPacket);
+ JdwpReplyPacket reply = fVirtualMachineImpl.packetReceiveManager()
+ .getReply(commandPacket);
long recieved = System.currentTimeMillis();
if (JDIDebugOptions.DEBUG_JDI_REQUEST_TIMES) {
StringBuffer buf = new StringBuffer();
@@ -193,23 +207,28 @@ public class MirrorImpl implements Mirror {
fVerboseWriter.println("Received reply"); //$NON-NLS-1$
fVerboseWriter.println("length", reply.getLength()); //$NON-NLS-1$
fVerboseWriter.println("id", reply.getId()); //$NON-NLS-1$
- fVerboseWriter.println("flags", reply.getFlags(), JdwpPacket.getFlagMap()); //$NON-NLS-1$
- fVerboseWriter.println("error code", reply.errorCode(), JdwpReplyPacket.errorMap()); //$NON-NLS-1$
+ fVerboseWriter.println(
+ "flags", reply.getFlags(), JdwpPacket.getFlagMap()); //$NON-NLS-1$
+ fVerboseWriter
+ .println(
+ "error code", reply.errorCode(), JdwpReplyPacket.errorMap()); //$NON-NLS-1$
}
-
+
return reply;
}
-
+
/**
* Performs a VM request.
+ *
* @return Returns reply data.
*/
public JdwpReplyPacket requestVM(int command, ByteArrayOutputStream outData) {
return requestVM(command, outData.toByteArray());
}
-
+
/**
* Performs a VM request for a specified object.
+ *
* @return Returns reply data.
*/
public JdwpReplyPacket requestVM(int command, ObjectReferenceImpl object) {
@@ -222,9 +241,10 @@ public class MirrorImpl implements Mirror {
}
return requestVM(command, byteOutStream);
}
-
+
/**
* Performs a VM request for a specified object.
+ *
* @return Returns reply data.
*/
public JdwpReplyPacket requestVM(int command, ReferenceTypeImpl refType) {
@@ -237,13 +257,14 @@ public class MirrorImpl implements Mirror {
}
return requestVM(command, byteOutStream);
}
-
+
/**
* Performs a VM request.
+ *
* @return Returns reply data.
*/
public JdwpReplyPacket requestVM(int command) {
- return requestVM(command, (byte[])null);
+ return requestVM(command, (byte[]) null);
}
/**
@@ -251,215 +272,252 @@ public class MirrorImpl implements Mirror {
*/
public void defaultReplyErrorHandler(int error) {
switch (error) {
- case JdwpReplyPacket.NONE:
- break;
- case JdwpReplyPacket.INVALID_OBJECT:
- throw new ObjectCollectedException();
- case JdwpReplyPacket.INVALID_CLASS:
- throw new ClassNotPreparedException();
- case JdwpReplyPacket.CLASS_NOT_PREPARED:
- throw new ClassNotPreparedException();
- case JdwpReplyPacket.OUT_OF_MEMORY:
- throw new VMOutOfMemoryException();
- case JdwpReplyPacket.ILLEGAL_ARGUMENT:
- throw new IllegalArgumentException();
- case JdwpReplyPacket.NATIVE_METHOD:
- throw new NativeMethodException();
- case JdwpReplyPacket.INVALID_FRAMEID:
- throw new InvalidStackFrameException();
- case JdwpReplyPacket.NOT_IMPLEMENTED:
- throw new UnsupportedOperationException();
- case JdwpReplyPacket.HCR_OPERATION_REFUSED:
- throw new org.eclipse.jdi.hcr.OperationRefusedException();
- case JdwpReplyPacket.VM_DEAD:
- throw new VMDisconnectedException();
- default:
- throw new InternalException(JDIMessages.MirrorImpl_Got_error_code_in_reply___1 + error, error);
- }
- }
-
- /**
- * Performs default handling of IOException in creating or interpreting a Jdwp packet.
+ case JdwpReplyPacket.NONE:
+ break;
+ case JdwpReplyPacket.INVALID_OBJECT:
+ throw new ObjectCollectedException();
+ case JdwpReplyPacket.INVALID_CLASS:
+ throw new ClassNotPreparedException();
+ case JdwpReplyPacket.CLASS_NOT_PREPARED:
+ throw new ClassNotPreparedException();
+ case JdwpReplyPacket.OUT_OF_MEMORY:
+ throw new VMOutOfMemoryException();
+ case JdwpReplyPacket.ILLEGAL_ARGUMENT:
+ throw new IllegalArgumentException();
+ case JdwpReplyPacket.NATIVE_METHOD:
+ throw new NativeMethodException();
+ case JdwpReplyPacket.INVALID_FRAMEID:
+ throw new InvalidStackFrameException();
+ case JdwpReplyPacket.NOT_IMPLEMENTED:
+ throw new UnsupportedOperationException();
+ case JdwpReplyPacket.HCR_OPERATION_REFUSED:
+ throw new org.eclipse.jdi.hcr.OperationRefusedException();
+ case JdwpReplyPacket.VM_DEAD:
+ throw new VMDisconnectedException();
+ default:
+ throw new InternalException(
+ JDIMessages.MirrorImpl_Got_error_code_in_reply___1 + error,
+ error);
+ }
+ }
+
+ /**
+ * Performs default handling of IOException in creating or interpreting a
+ * Jdwp packet.
*/
public void defaultIOExceptionHandler(Exception e) {
- throw new InternalException(JDIMessages.MirrorImpl_Got_invalid_data___2 + e);
+ throw new InternalException(JDIMessages.MirrorImpl_Got_invalid_data___2
+ + e);
}
-
+
/**
* Waits for a specified command packet from the VM.
+ *
* @return Returns Command Packet from VM.
*/
- public final JdwpCommandPacket getCommandVM(int command, long timeout) throws InterruptedException {
- return fVirtualMachineImpl.packetReceiveManager().getCommand(command, timeout);
+ public final JdwpCommandPacket getCommandVM(int command, long timeout)
+ throws InterruptedException {
+ return fVirtualMachineImpl.packetReceiveManager().getCommand(command,
+ timeout);
}
-
+
/**
- * @exception VMMismatchException is thrown if the Mirror argument and this mirror do not belong to the same VirtualMachine.
+ * @exception VMMismatchException
+ * is thrown if the Mirror argument and this mirror do not
+ * belong to the same VirtualMachine.
*/
public void checkVM(Mirror mirror) throws VMMismatchException {
- if (((MirrorImpl)mirror).virtualMachineImpl() != this.virtualMachineImpl())
+ if (((MirrorImpl) mirror).virtualMachineImpl() != this
+ .virtualMachineImpl())
throw new VMMismatchException();
}
-
+
/**
* Disconnects VM.
*/
public void disconnectVM() {
- fVirtualMachineImpl.setDisconnected(true);
+ fVirtualMachineImpl.setDisconnected(true);
fVirtualMachineImpl.packetSendManager().disconnectVM();
fVirtualMachineImpl.packetReceiveManager().disconnectVM();
- ((VirtualMachineManagerImpl) Bootstrap.virtualMachineManager()).removeConnectedVM(fVirtualMachineImpl);
+ ((VirtualMachineManagerImpl) Bootstrap.virtualMachineManager())
+ .removeConnectedVM(fVirtualMachineImpl);
}
/**
* Reads Jdwp data and, if verbose is on, outputs verbose info.
+ *
* @return Returns value that has been read.
*/
- public byte readByte(String description, DataInputStream in) throws IOException {
+ public byte readByte(String description, DataInputStream in)
+ throws IOException {
byte result = in.readByte();
if (fVerboseWriter != null) {
fVerboseWriter.println(description, result);
}
return result;
}
-
+
/**
* Reads Jdwp data and, if verbose is on, outputs verbose info.
+ *
* @return Returns value that has been read.
*/
- public short readShort(String description, DataInputStream in) throws IOException {
+ public short readShort(String description, DataInputStream in)
+ throws IOException {
short result = in.readShort();
if (fVerboseWriter != null) {
fVerboseWriter.println(description, result);
}
return result;
}
-
+
/**
* Reads Jdwp data and, if verbose is on, outputs verbose info.
+ *
* @return Returns value that has been read.
*/
- public int readInt(String description, DataInputStream in) throws IOException {
+ public int readInt(String description, DataInputStream in)
+ throws IOException {
int result = in.readInt();
if (fVerboseWriter != null) {
fVerboseWriter.println(description, result);
}
return result;
}
-
+
/**
* Reads Jdwp data and, if verbose is on, outputs verbose info.
+ *
* @return Returns value that has been read.
*/
- public long readLong(String description, DataInputStream in) throws IOException {
+ public long readLong(String description, DataInputStream in)
+ throws IOException {
long result = in.readLong();
if (fVerboseWriter != null) {
fVerboseWriter.println(description, result);
}
return result;
}
-
+
/**
* Reads Jdwp data and, if verbose is on, outputs verbose info.
+ *
* @return Returns value that has been read.
*/
- public byte readByte(String description, Map valueToString, DataInputStream in) throws IOException {
+ public byte readByte(String description, Map<Integer, String> valueToString,
+ DataInputStream in) throws IOException {
byte result = in.readByte();
if (fVerboseWriter != null) {
fVerboseWriter.println(description, result, valueToString);
}
return result;
}
-
+
/**
* Reads Jdwp data and, if verbose is on, outputs verbose info.
+ *
* @return Returns value that has been read.
*/
- public short readShort(String description, Map valueToString, DataInputStream in) throws IOException {
+ public short readShort(String description, Map<Integer, String> valueToString,
+ DataInputStream in) throws IOException {
short result = in.readShort();
if (fVerboseWriter != null) {
fVerboseWriter.println(description, result, valueToString);
}
return result;
}
-
+
/**
* Reads Jdwp data and, if verbose is on, outputs verbose info.
+ *
* @return Returns value that has been read.
*/
- public int readInt(String description, Map valueToString, DataInputStream in) throws IOException {
+ public int readInt(String description, Map<Integer, String> valueToString, DataInputStream in)
+ throws IOException {
int result = in.readInt();
if (fVerboseWriter != null) {
fVerboseWriter.println(description, result, valueToString);
}
return result;
}
-
+
/**
* Reads Jdwp data and, if verbose is on, outputs verbose info.
+ *
* @return Returns value that has been read.
*/
- public String readString(String description, DataInputStream in) throws IOException {
+ public String readString(String description, DataInputStream in)
+ throws IOException {
String result = JdwpString.read(in);
if (fVerboseWriter != null) {
fVerboseWriter.println(description, result);
}
return result;
}
-
+
/**
* Reads Jdwp data and, if verbose is on, outputs verbose info.
+ *
* @return Returns value that has been read.
*/
- public boolean readBoolean(String description, DataInputStream in) throws IOException {
+ public boolean readBoolean(String description, DataInputStream in)
+ throws IOException {
boolean result = in.readBoolean();
if (fVerboseWriter != null) {
fVerboseWriter.println(description, result);
}
return result;
}
-
+
/**
* Reads Jdwp data and, if verbose is on, outputs verbose info.
+ *
* @return Returns value that has been read.
*/
- public char readChar(String description, DataInputStream in) throws IOException {
+ public char readChar(String description, DataInputStream in)
+ throws IOException {
char result = in.readChar();
if (fVerboseWriter != null) {
fVerboseWriter.println(description, result);
}
return result;
}
-
+
/**
* Reads Jdwp data and, if verbose is on, outputs verbose info.
+ *
* @return Returns value that has been read.
*/
- public double readDouble(String description, DataInputStream in) throws IOException {
+ public double readDouble(String description, DataInputStream in)
+ throws IOException {
double result = in.readDouble();
if (fVerboseWriter != null) {
fVerboseWriter.println(description, result);
}
return result;
}
-
+
/**
* Reads Jdwp data and, if verbose is on, outputs verbose info.
+ *
* @return Returns value that has been read.
*/
- public float readFloat(String description, DataInputStream in) throws IOException {
+ public float readFloat(String description, DataInputStream in)
+ throws IOException {
float result = in.readFloat();
if (fVerboseWriter != null) {
fVerboseWriter.println(description, result);
}
return result;
}
-
+
/**
* Reads Jdwp data and, if verbose is on, outputs verbose info.
+ *
* @return Returns value that has been read.
*/
- public byte[] readByteArray(int length, String description, DataInputStream in) throws IOException {
+ public byte[] readByteArray(int length, String description,
+ DataInputStream in) throws IOException {
byte[] result = new byte[length];
in.readFully(result);
if (fVerboseWriter != null) {
@@ -467,11 +525,12 @@ public class MirrorImpl implements Mirror {
}
return result;
}
-
+
/**
* Writes Jdwp data and, if verbose is on, outputs verbose info.
*/
- public void writeByte(byte value, String description, DataOutputStream out) throws IOException {
+ public void writeByte(byte value, String description, DataOutputStream out)
+ throws IOException {
out.writeByte(value);
if (fVerboseWriter != null) {
fVerboseWriter.println(description, value);
@@ -481,7 +540,8 @@ public class MirrorImpl implements Mirror {
/**
* Writes Jdwp data and, if verbose is on, outputs verbose info.
*/
- public void writeShort(short value, String description, DataOutputStream out) throws IOException {
+ public void writeShort(short value, String description, DataOutputStream out)
+ throws IOException {
out.writeShort(value);
if (fVerboseWriter != null) {
fVerboseWriter.println(description, value);
@@ -491,7 +551,8 @@ public class MirrorImpl implements Mirror {
/**
* Writes Jdwp data and, if verbose is on, outputs verbose info.
*/
- public void writeInt(int value, String description, DataOutputStream out) throws IOException {
+ public void writeInt(int value, String description, DataOutputStream out)
+ throws IOException {
out.writeInt(value);
if (fVerboseWriter != null) {
fVerboseWriter.println(description, value);
@@ -501,7 +562,8 @@ public class MirrorImpl implements Mirror {
/**
* Writes Jdwp data and, if verbose is on, outputs verbose info.
*/
- public void writeLong(long value, String description, DataOutputStream out) throws IOException {
+ public void writeLong(long value, String description, DataOutputStream out)
+ throws IOException {
out.writeLong(value);
if (fVerboseWriter != null) {
fVerboseWriter.println(description, value);
@@ -511,87 +573,96 @@ public class MirrorImpl implements Mirror {
/**
* Writes Jdwp data and, if verbose is on, outputs verbose info.
*/
- public void writeByte(byte value, String description, Map valueToString, DataOutputStream out) throws IOException {
+ public void writeByte(byte value, String description, Map<Integer, String> valueToString,
+ DataOutputStream out) throws IOException {
out.writeByte(value);
if (fVerboseWriter != null) {
fVerboseWriter.println(description, value, valueToString);
}
}
-
+
/**
* Writes Jdwp data and, if verbose is on, outputs verbose info.
*/
- public void writeShort(short value, String description, Map valueToString, DataOutputStream out) throws IOException {
+ public void writeShort(short value, String description, Map<Integer, String> valueToString,
+ DataOutputStream out) throws IOException {
out.writeShort(value);
if (fVerboseWriter != null) {
fVerboseWriter.println(description, value, valueToString);
}
}
-
+
/**
* Writes Jdwp data and, if verbose is on, outputs verbose info.
*/
- public void writeInt(int value, String description, Map valueToString, DataOutputStream out) throws IOException {
+ public void writeInt(int value, String description, Map<Integer, String> valueToString,
+ DataOutputStream out) throws IOException {
out.writeInt(value);
if (fVerboseWriter != null) {
fVerboseWriter.println(description, value, valueToString);
}
}
-
+
/**
* Writes Jdwp data and, if verbose is on, outputs verbose info.
*/
- public void writeString(String value, String description, DataOutputStream out) throws IOException {
+ public void writeString(String value, String description,
+ DataOutputStream out) throws IOException {
JdwpString.write(value, out);
if (fVerboseWriter != null) {
fVerboseWriter.println(description, value);
}
}
-
+
/**
* Writes Jdwp data and, if verbose is on, outputs verbose info.
*/
- public void writeBoolean(boolean value, String description, DataOutputStream out) throws IOException {
+ public void writeBoolean(boolean value, String description,
+ DataOutputStream out) throws IOException {
out.writeBoolean(value);
if (fVerboseWriter != null) {
fVerboseWriter.println(description, value);
}
}
-
+
/**
* Writes Jdwp data and, if verbose is on, outputs verbose info.
*/
- public void writeChar(char value, String description, DataOutputStream out) throws IOException {
+ public void writeChar(char value, String description, DataOutputStream out)
+ throws IOException {
out.writeChar(value);
if (fVerboseWriter != null) {
fVerboseWriter.println(description, value);
}
}
-
+
/**
* Writes Jdwp data and, if verbose is on, outputs verbose info.
*/
- public void writeDouble(double value, String description, DataOutputStream out) throws IOException {
+ public void writeDouble(double value, String description,
+ DataOutputStream out) throws IOException {
out.writeDouble(value);
if (fVerboseWriter != null) {
fVerboseWriter.println(description, value);
}
}
-
+
/**
* Writes Jdwp data and, if verbose is on, outputs verbose info.
*/
- public void writeFloat(float value, String description, DataOutputStream out) throws IOException {
+ public void writeFloat(float value, String description, DataOutputStream out)
+ throws IOException {
out.writeFloat(value);
if (fVerboseWriter != null) {
fVerboseWriter.println(description, value);
}
}
-
+
/**
* Writes Jdwp data and, if verbose is on, outputs verbose info.
*/
- public void writeShort(short value, String description, String[] bitNames, DataOutputStream out) throws IOException {
+ public void writeShort(short value, String description, String[] bitNames,
+ DataOutputStream out) throws IOException {
out.writeShort(value);
if (fVerboseWriter != null) {
fVerboseWriter.println(description, value, bitNames);
@@ -601,7 +672,8 @@ public class MirrorImpl implements Mirror {
/**
* Writes Jdwp data and, if verbose is on, outputs verbose info.
*/
- public void writeInt(int value, String description, String[] bitNames, DataOutputStream out) throws IOException {
+ public void writeInt(int value, String description, String[] bitNames,
+ DataOutputStream out) throws IOException {
out.writeInt(value);
if (fVerboseWriter != null) {
fVerboseWriter.println(description, value, bitNames);
@@ -610,21 +682,25 @@ public class MirrorImpl implements Mirror {
/**
* Reads Jdwp data and, if verbose is on, outputs verbose info.
+ *
* @return Returns value that has been read.
*/
- public byte readByte(String description, String[] bitNames, DataInputStream in) throws IOException {
+ public byte readByte(String description, String[] bitNames,
+ DataInputStream in) throws IOException {
byte result = in.readByte();
if (fVerboseWriter != null) {
- fVerboseWriter.println(description, result, bitNames);
+ fVerboseWriter.println(description, result, bitNames);
}
return result;
}
/**
* Reads Jdwp data and, if verbose is on, outputs verbose info.
+ *
* @return Returns value that has been read.
*/
- public short readShort(String description, String[] bitNames, DataInputStream in) throws IOException {
+ public short readShort(String description, String[] bitNames,
+ DataInputStream in) throws IOException {
short result = in.readShort();
if (fVerboseWriter != null) {
fVerboseWriter.println(description, result, bitNames);
@@ -634,9 +710,11 @@ public class MirrorImpl implements Mirror {
/**
* Reads Jdwp data and, if verbose is on, outputs verbose info.
+ *
* @return Returns value that has been read.
*/
- public int readInt(String description, String[] bitNames, DataInputStream in) throws IOException {
+ public int readInt(String description, String[] bitNames, DataInputStream in)
+ throws IOException {
int result = in.readInt();
if (fVerboseWriter != null) {
fVerboseWriter.println(description, result, bitNames);
@@ -647,17 +725,19 @@ public class MirrorImpl implements Mirror {
/**
* Writes Jdwp data and, if verbose is on, outputs verbose info.
*/
- public void writeByte(byte value, String description, String[] bitNames, DataOutputStream out) throws IOException {
+ public void writeByte(byte value, String description, String[] bitNames,
+ DataOutputStream out) throws IOException {
out.writeByte(value);
if (fVerboseWriter != null) {
fVerboseWriter.println(description, value, bitNames);
}
}
-
- /**
- * @return Returns VerboseWriter where verbose info is written to, null if no verbose must be given.
+
+ /**
+ * @return Returns VerboseWriter where verbose info is written to, null if
+ * no verbose must be given.
*/
public VerboseWriter verboseWriter() {
return fVerboseWriter;
- }
+ }
}

Back to the top