KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdi > internal > MirrorImpl


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdi.internal;
12
13
14 import java.io.ByteArrayOutputStream JavaDoc;
15 import java.io.DataInputStream JavaDoc;
16 import java.io.DataOutputStream JavaDoc;
17 import java.io.IOException JavaDoc;
18 import java.io.PrintWriter JavaDoc;
19 import java.util.Map JavaDoc;
20
21 import org.eclipse.jdi.Bootstrap;
22 import org.eclipse.jdi.internal.jdwp.JdwpCommandPacket;
23 import org.eclipse.jdi.internal.jdwp.JdwpPacket;
24 import org.eclipse.jdi.internal.jdwp.JdwpReplyPacket;
25 import org.eclipse.jdi.internal.jdwp.JdwpString;
26
27 import com.sun.jdi.ClassNotPreparedException;
28 import com.sun.jdi.InternalException;
29 import com.sun.jdi.InvalidStackFrameException;
30 import com.sun.jdi.Mirror;
31 import com.sun.jdi.NativeMethodException;
32 import com.sun.jdi.ObjectCollectedException;
33 import com.sun.jdi.VMDisconnectedException;
34 import com.sun.jdi.VMMismatchException;
35 import com.sun.jdi.VMOutOfMemoryException;
36 import com.sun.jdi.VirtualMachine;
37
38 /**
39  * this class implements the corresponding interfaces
40  * declared by the JDI specification. See the com.sun.jdi package
41  * for more information.
42  *
43  */

44 public class MirrorImpl implements Mirror {
45     
46     /** Description of Mirror object. */
47     protected String JavaDoc fDescription;
48     /** Virtual Machine of Mirror object. */
49     private VirtualMachineImpl fVirtualMachineImpl;
50     /** VerboseWriter where verbose info is written to, null if no verbose must be given. */
51     protected VerboseWriter fVerboseWriter = null;
52     /** True if a Jdwp request has been sent to the VM and the response is not yet (fully) processed. */
53     private boolean fPendingJdwpRequest = false;
54
55     /**
56      * Constructor only to be used by Virtual Machine objects: stores description of Mirror object and Virtual Machine.
57      */

58     public MirrorImpl(String JavaDoc description) {
59         fDescription = description;
60         fVirtualMachineImpl = (VirtualMachineImpl)this;
61         PrintWriter JavaDoc writer = ((VirtualMachineManagerImpl)org.eclipse.jdi.Bootstrap.virtualMachineManager()).verbosePrintWriter();
62         if (writer != null)
63             fVerboseWriter = new VerboseWriter(writer);
64     }
65
66     /**
67      * Constructor stores description of Mirror object and its Virtual Machine.
68      */

69     public MirrorImpl(String JavaDoc description, VirtualMachineImpl virtualMachineImpl) {
70         fVirtualMachineImpl = virtualMachineImpl;
71         fDescription = description;
72         PrintWriter JavaDoc writer = ((VirtualMachineManagerImpl)org.eclipse.jdi.Bootstrap.virtualMachineManager()).verbosePrintWriter();
73         if (writer != null)
74             fVerboseWriter = new VerboseWriter(writer);
75     }
76     
77     /**
78      * @return Returns description of Mirror object.
79      */

80     public String JavaDoc toString() {
81         return fDescription;
82     }
83
84     /**
85      * @return Returns Virtual Machine of Mirror object.
86      */

87     public VirtualMachine virtualMachine() {
88         return fVirtualMachineImpl;
89     }
90
91     /**
92      * @return Returns Virtual Machine implementation of Mirror object.
93      */

94     public VirtualMachineImpl virtualMachineImpl() {
95         return fVirtualMachineImpl;
96     }
97
98     /**
99      * Processing before each Jdwp event.
100      */

101     public void initJdwpEventSet(JdwpCommandPacket commandPacket) {
102         if (fVerboseWriter != null) {
103             fVerboseWriter.println("Received event set"); //$NON-NLS-1$
104
fVerboseWriter.println("length", commandPacket.getLength()); //$NON-NLS-1$
105
fVerboseWriter.println("id", commandPacket.getId()); //$NON-NLS-1$
106
fVerboseWriter.println("flags", commandPacket.getFlags(), JdwpPacket.getFlagMap()); //$NON-NLS-1$
107
fVerboseWriter.println("command set", (byte)(commandPacket.getCommand() >>> 8)); //$NON-NLS-1$
108
fVerboseWriter.println("command", (byte)commandPacket.getCommand()); //$NON-NLS-1$
109
}
110     }
111     
112     /**
113      * Processing after each Jdwp Event.
114      */

115     public void handledJdwpEventSet() {
116         if (fVerboseWriter != null) {
117             fVerboseWriter.println();
118             fVerboseWriter.flush();
119         }
120     }
121     
122     /**
123      * Processing before each Jdwp request.
124      * Note that this includes building the request message and parsing the response.
125      */

126     public void initJdwpRequest() {
127         if (fVerboseWriter != null) {
128             fVerboseWriter.gotoPosition(6);
129         }
130     }
131     
132     /**
133      * Writes command packet header if verbose is on.
134      */

135     public void writeVerboseCommandPacketHeader(JdwpCommandPacket commandPacket) {
136         if (fVerboseWriter != null) {
137             int command = commandPacket.getCommand();
138             int currentPosition = fVerboseWriter.position();
139             fVerboseWriter.gotoPosition(0);
140             fVerboseWriter.print("Sending command ("); //$NON-NLS-1$
141
fVerboseWriter.printValue(command, JdwpCommandPacket.commandMap());
142             fVerboseWriter.println(")"); //$NON-NLS-1$
143
fVerboseWriter.println("length", commandPacket.getLength()); //$NON-NLS-1$
144
fVerboseWriter.println("id", commandPacket.getId()); //$NON-NLS-1$
145
fVerboseWriter.println("flags", commandPacket.getFlags(), JdwpPacket.getFlagMap()); //$NON-NLS-1$
146
fVerboseWriter.println("command set", (byte)(command >>> 8)); //$NON-NLS-1$
147
fVerboseWriter.println("command", (byte)command); //$NON-NLS-1$
148
fVerboseWriter.gotoPosition(currentPosition);
149         }
150     }
151     
152     /**
153      * Processing after each Jdwp Request.
154      */

155     public void handledJdwpRequest() {
156         if (fVerboseWriter != null && fPendingJdwpRequest) {
157             fVerboseWriter.println();
158             fVerboseWriter.flush();
159         }
160         fPendingJdwpRequest = false;
161     }
162     
163     /**
164      * Performs a VM request.
165      * @return Returns reply data.
166      */

167     public JdwpReplyPacket requestVM(int command, byte[] outData) {
168         JdwpCommandPacket commandPacket = new JdwpCommandPacket(command);
169         commandPacket.setData(outData);
170         fVirtualMachineImpl.packetSendManager().sendPacket(commandPacket);
171         fPendingJdwpRequest = true;
172         writeVerboseCommandPacketHeader(commandPacket);
173
174         JdwpReplyPacket reply = fVirtualMachineImpl.packetReceiveManager().getReply(commandPacket);
175         if (fVerboseWriter != null) {
176             fVerboseWriter.println();
177             fVerboseWriter.println("Received reply"); //$NON-NLS-1$
178
fVerboseWriter.println("length", reply.getLength()); //$NON-NLS-1$
179
fVerboseWriter.println("id", reply.getId()); //$NON-NLS-1$
180
fVerboseWriter.println("flags", reply.getFlags(), JdwpPacket.getFlagMap()); //$NON-NLS-1$
181
fVerboseWriter.println("error code", reply.errorCode(), JdwpReplyPacket.errorMap()); //$NON-NLS-1$
182
}
183         
184         return reply;
185     }
186     
187     /**
188      * Performs a VM request.
189      * @return Returns reply data.
190      */

191     public JdwpReplyPacket requestVM(int command, ByteArrayOutputStream JavaDoc outData) {
192         return requestVM(command, outData.toByteArray());
193     }
194     
195     /**
196      * Performs a VM request for a specified object.
197      * @return Returns reply data.
198      */

199     public JdwpReplyPacket requestVM(int command, ObjectReferenceImpl object) {
200         ByteArrayOutputStream JavaDoc byteOutStream = new ByteArrayOutputStream JavaDoc();
201         DataOutputStream JavaDoc dataOutStream = new DataOutputStream JavaDoc(byteOutStream);
202         try {
203             object.write(this, dataOutStream);
204         } catch (IOException JavaDoc e) {
205             defaultIOExceptionHandler(e);
206         }
207         return requestVM(command, byteOutStream);
208     }
209     
210     /**
211      * Performs a VM request for a specified object.
212      * @return Returns reply data.
213      */

214     public JdwpReplyPacket requestVM(int command, ReferenceTypeImpl refType) {
215         ByteArrayOutputStream JavaDoc byteOutStream = new ByteArrayOutputStream JavaDoc();
216         DataOutputStream JavaDoc dataOutStream = new DataOutputStream JavaDoc(byteOutStream);
217         try {
218             refType.write(this, dataOutStream);
219         } catch (IOException JavaDoc e) {
220             defaultIOExceptionHandler(e);
221         }
222         return requestVM(command, byteOutStream);
223     }
224     
225     /**
226      * Performs a VM request.
227      * @return Returns reply data.
228      */

229     public JdwpReplyPacket requestVM(int command) {
230         return requestVM(command, (byte[])null);
231     }
232
233     /**
234      * Performs default error handling.
235      */

236     public void defaultReplyErrorHandler(int error) {
237         switch (error) {
238             case JdwpReplyPacket.NONE:
239                 break;
240             case JdwpReplyPacket.INVALID_OBJECT:
241                 throw new ObjectCollectedException();
242             case JdwpReplyPacket.INVALID_CLASS:
243                 throw new ClassNotPreparedException();
244             case JdwpReplyPacket.CLASS_NOT_PREPARED:
245                 throw new ClassNotPreparedException();
246             case JdwpReplyPacket.OUT_OF_MEMORY:
247                 throw new VMOutOfMemoryException();
248             case JdwpReplyPacket.ILLEGAL_ARGUMENT:
249                 throw new IllegalArgumentException JavaDoc();
250             case JdwpReplyPacket.NATIVE_METHOD:
251                 throw new NativeMethodException();
252             case JdwpReplyPacket.INVALID_FRAMEID:
253                 throw new InvalidStackFrameException();
254             case JdwpReplyPacket.NOT_IMPLEMENTED:
255                 throw new UnsupportedOperationException JavaDoc();
256             case JdwpReplyPacket.HCR_OPERATION_REFUSED:
257                 throw new org.eclipse.jdi.hcr.OperationRefusedException();
258             case JdwpReplyPacket.VM_DEAD:
259                 throw new VMDisconnectedException();
260             default:
261                 throw new InternalException(JDIMessages.MirrorImpl_Got_error_code_in_reply___1 + error);
262         }
263     }
264
265     /**
266      * Performs default handling of IOException in creating or interpreting a Jdwp packet.
267      */

268     public void defaultIOExceptionHandler(Exception JavaDoc e) {
269         throw new InternalException(JDIMessages.MirrorImpl_Got_invalid_data___2 + e);
270     }
271     
272     /**
273      * Waits for a specified command packet from the VM.
274      * @return Returns Command Packet from VM.
275      */

276     public final JdwpCommandPacket getCommandVM(int command, long timeout) throws InterruptedException JavaDoc {
277         return fVirtualMachineImpl.packetReceiveManager().getCommand(command, timeout);
278     }
279     
280     /**
281      * @exception VMMismatchException is thrown if the Mirror argument and this mirror do not belong to the same VirtualMachine.
282      */

283     public void checkVM(Mirror mirror) throws VMMismatchException {
284         if (((MirrorImpl)mirror).virtualMachineImpl() != this.virtualMachineImpl())
285             throw new VMMismatchException();
286     }
287     
288     /**
289      * Disconnects VM.
290      */

291     public void disconnectVM() {
292         fVirtualMachineImpl.setDisconnected(true);
293         fVirtualMachineImpl.packetSendManager().disconnectVM();
294         fVirtualMachineImpl.packetReceiveManager().disconnectVM();
295         ((VirtualMachineManagerImpl) Bootstrap.virtualMachineManager()).removeConnectedVM(fVirtualMachineImpl);
296     }
297
298     /**
299      * Reads Jdwp data and, if verbose is on, outputs verbose info.
300      * @return Returns value that has been read.
301      */

302     public byte readByte(String JavaDoc description, DataInputStream JavaDoc in) throws IOException JavaDoc {
303         byte result = in.readByte();
304         if (fVerboseWriter != null) {
305             fVerboseWriter.println(description, result);
306         }
307         return result;
308     }
309     
310     /**
311      * Reads Jdwp data and, if verbose is on, outputs verbose info.
312      * @return Returns value that has been read.
313      */

314     public short readShort(String JavaDoc description, DataInputStream JavaDoc in) throws IOException JavaDoc {
315         short result = in.readShort();
316         if (fVerboseWriter != null) {
317             fVerboseWriter.println(description, result);
318         }
319         return result;
320     }
321     
322     /**
323      * Reads Jdwp data and, if verbose is on, outputs verbose info.
324      * @return Returns value that has been read.
325      */

326     public int readInt(String JavaDoc description, DataInputStream JavaDoc in) throws IOException JavaDoc {
327         int result = in.readInt();
328         if (fVerboseWriter != null) {
329             fVerboseWriter.println(description, result);
330         }
331         return result;
332     }
333     
334     /**
335      * Reads Jdwp data and, if verbose is on, outputs verbose info.
336      * @return Returns value that has been read.
337      */

338     public long readLong(String JavaDoc description, DataInputStream JavaDoc in) throws IOException JavaDoc {
339         long result = in.readLong();
340         if (fVerboseWriter != null) {
341             fVerboseWriter.println(description, result);
342         }
343         return result;
344     }
345     
346     /**
347      * Reads Jdwp data and, if verbose is on, outputs verbose info.
348      * @return Returns value that has been read.
349      */

350     public byte readByte(String JavaDoc description, Map JavaDoc valueToString, DataInputStream JavaDoc in) throws IOException JavaDoc {
351         byte result = in.readByte();
352         if (fVerboseWriter != null) {
353             fVerboseWriter.println(description, result, valueToString);
354         }
355         return result;
356     }
357     
358     /**
359      * Reads Jdwp data and, if verbose is on, outputs verbose info.
360      * @return Returns value that has been read.
361      */

362     public short readShort(String JavaDoc description, Map JavaDoc valueToString, DataInputStream JavaDoc in) throws IOException JavaDoc {
363         short result = in.readShort();
364         if (fVerboseWriter != null) {
365             fVerboseWriter.println(description, result, valueToString);
366         }
367         return result;
368     }
369     
370     /**
371      * Reads Jdwp data and, if verbose is on, outputs verbose info.
372      * @return Returns value that has been read.
373      */

374     public int readInt(String JavaDoc description, Map JavaDoc valueToString, DataInputStream JavaDoc in) throws IOException JavaDoc {
375         int result = in.readInt();
376         if (fVerboseWriter != null) {
377             fVerboseWriter.println(description, result, valueToString);
378         }
379         return result;
380     }
381     
382     /**
383      * Reads Jdwp data and, if verbose is on, outputs verbose info.
384      * @return Returns value that has been read.
385      */

386     public String JavaDoc readString(String JavaDoc description, DataInputStream JavaDoc in) throws IOException JavaDoc {
387         String JavaDoc result = JdwpString.read(in);
388         if (fVerboseWriter != null) {
389             fVerboseWriter.println(description, result);
390         }
391         return result;
392     }
393     
394     /**
395      * Reads Jdwp data and, if verbose is on, outputs verbose info.
396      * @return Returns value that has been read.
397      */

398     public boolean readBoolean(String JavaDoc description, DataInputStream JavaDoc in) throws IOException JavaDoc {
399         boolean result = in.readBoolean();
400         if (fVerboseWriter != null) {
401             fVerboseWriter.println(description, result);
402         }
403         return result;
404     }
405     
406     /**
407      * Reads Jdwp data and, if verbose is on, outputs verbose info.
408      * @return Returns value that has been read.
409      */

410     public char readChar(String JavaDoc description, DataInputStream JavaDoc in) throws IOException JavaDoc {
411         char result = in.readChar();
412         if (fVerboseWriter != null) {
413             fVerboseWriter.println(description, result);
414         }
415         return result;
416     }
417     
418     /**
419      * Reads Jdwp data and, if verbose is on, outputs verbose info.
420      * @return Returns value that has been read.
421      */

422     public double readDouble(String JavaDoc description, DataInputStream JavaDoc in) throws IOException JavaDoc {
423         double result = in.readDouble();
424         if (fVerboseWriter != null) {
425             fVerboseWriter.println(description, result);
426         }
427         return result;
428     }
429     
430     /**
431      * Reads Jdwp data and, if verbose is on, outputs verbose info.
432      * @return Returns value that has been read.
433      */

434     public float readFloat(String JavaDoc description, DataInputStream JavaDoc in) throws IOException JavaDoc {
435         float result = in.readFloat();
436         if (fVerboseWriter != null) {
437             fVerboseWriter.println(description, result);
438         }
439         return result;
440     }
441     
442     /**
443      * Reads Jdwp data and, if verbose is on, outputs verbose info.
444      * @return Returns value that has been read.
445      */

446     public byte[] readByteArray(int length, String JavaDoc description, DataInputStream JavaDoc in) throws IOException JavaDoc {
447         byte[] result = new byte[length];
448         in.readFully(result);
449         if (fVerboseWriter != null) {
450             fVerboseWriter.println(description, result);
451         }
452         return result;
453     }
454     
455     /**
456      * Writes Jdwp data and, if verbose is on, outputs verbose info.
457      */

458     public void writeByte(byte value, String JavaDoc description, DataOutputStream JavaDoc out) throws IOException JavaDoc {
459         out.writeByte(value);
460         if (fVerboseWriter != null) {
461             fVerboseWriter.println(description, value);
462         }
463     }
464
465     /**
466      * Writes Jdwp data and, if verbose is on, outputs verbose info.
467      */

468     public void writeShort(short value, String JavaDoc description, DataOutputStream JavaDoc out) throws IOException JavaDoc {
469         out.writeShort(value);
470         if (fVerboseWriter != null) {
471             fVerboseWriter.println(description, value);
472         }
473     }
474
475     /**
476      * Writes Jdwp data and, if verbose is on, outputs verbose info.
477      */

478     public void writeInt(int value, String JavaDoc description, DataOutputStream JavaDoc out) throws IOException JavaDoc {
479         out.writeInt(value);
480         if (fVerboseWriter != null) {
481             fVerboseWriter.println(description, value);
482         }
483     }
484
485     /**
486      * Writes Jdwp data and, if verbose is on, outputs verbose info.
487      */

488     public void writeLong(long value, String JavaDoc description, DataOutputStream JavaDoc out) throws IOException JavaDoc {
489         out.writeLong(value);
490         if (fVerboseWriter != null) {
491             fVerboseWriter.println(description, value);
492         }
493     }
494
495     /**
496      * Writes Jdwp data and, if verbose is on, outputs verbose info.
497      */

498     public void writeByte(byte value, String JavaDoc description, Map JavaDoc valueToString, DataOutputStream JavaDoc out) throws IOException JavaDoc {
499         out.writeByte(value);
500         if (fVerboseWriter != null) {
501             fVerboseWriter.println(description, value, valueToString);
502         }
503     }
504     
505     /**
506      * Writes Jdwp data and, if verbose is on, outputs verbose info.
507      */

508     public void writeShort(short value, String JavaDoc description, Map JavaDoc valueToString, DataOutputStream JavaDoc out) throws IOException JavaDoc {
509         out.writeShort(value);
510         if (fVerboseWriter != null) {
511             fVerboseWriter.println(description, value, valueToString);
512         }
513     }
514     
515     /**
516      * Writes Jdwp data and, if verbose is on, outputs verbose info.
517      */

518     public void writeInt(int value, String JavaDoc description, Map JavaDoc valueToString, DataOutputStream JavaDoc out) throws IOException JavaDoc {
519         out.writeInt(value);
520         if (fVerboseWriter != null) {
521             fVerboseWriter.println(description, value, valueToString);
522         }
523     }
524     
525     /**
526      * Writes Jdwp data and, if verbose is on, outputs verbose info.
527      */

528     public void writeString(String JavaDoc value, String JavaDoc description, DataOutputStream JavaDoc out) throws IOException JavaDoc {
529         JdwpString.write(value, out);
530         if (fVerboseWriter != null) {
531             fVerboseWriter.println(description, value);
532         }
533     }
534     
535     /**
536      * Writes Jdwp data and, if verbose is on, outputs verbose info.
537      */

538     public void writeBoolean(boolean value, String JavaDoc description, DataOutputStream JavaDoc out) throws IOException JavaDoc {
539         out.writeBoolean(value);
540         if (fVerboseWriter != null) {
541             fVerboseWriter.println(description, value);
542         }
543     }
544     
545     /**
546      * Writes Jdwp data and, if verbose is on, outputs verbose info.
547      */

548     public void writeChar(char value, String JavaDoc description, DataOutputStream JavaDoc out) throws IOException JavaDoc {
549         out.writeChar(value);
550         if (fVerboseWriter != null) {
551             fVerboseWriter.println(description, value);
552         }
553     }
554     
555     /**
556      * Writes Jdwp data and, if verbose is on, outputs verbose info.
557      */

558     public void writeDouble(double value, String JavaDoc description, DataOutputStream JavaDoc out) throws IOException JavaDoc {
559         out.writeDouble(value);
560         if (fVerboseWriter != null) {
561             fVerboseWriter.println(description, value);
562         }
563     }
564     
565     /**
566      * Writes Jdwp data and, if verbose is on, outputs verbose info.
567      */

568     public void writeFloat(float value, String JavaDoc description, DataOutputStream JavaDoc out) throws IOException JavaDoc {
569         out.writeFloat(value);
570         if (fVerboseWriter != null) {
571             fVerboseWriter.println(description, value);
572         }
573     }
574     
575     /**
576      * Writes Jdwp data and, if verbose is on, outputs verbose info.
577      */

578     public void writeShort(short value, String JavaDoc description, String JavaDoc[] bitNames, DataOutputStream JavaDoc out) throws IOException JavaDoc {
579         out.writeShort(value);
580         if (fVerboseWriter != null) {
581             fVerboseWriter.println(description, value, bitNames);
582         }
583     }
584
585     /**
586      * Writes Jdwp data and, if verbose is on, outputs verbose info.
587      */

588     public void writeInt(int value, String JavaDoc description, String JavaDoc[] bitNames, DataOutputStream JavaDoc out) throws IOException JavaDoc {
589         out.writeInt(value);
590         if (fVerboseWriter != null) {
591             fVerboseWriter.println(description, value, bitNames);
592         }
593     }
594
595     /**
596      * Reads Jdwp data and, if verbose is on, outputs verbose info.
597      * @return Returns value that has been read.
598      */

599     public byte readByte(String JavaDoc description, String JavaDoc[] bitNames, DataInputStream JavaDoc in) throws IOException JavaDoc {
600         byte result = in.readByte();
601         if (fVerboseWriter != null) {
602             fVerboseWriter.println(description, result, bitNames);
603         }
604         return result;
605     }
606
607     /**
608      * Reads Jdwp data and, if verbose is on, outputs verbose info.
609      * @return Returns value that has been read.
610      */

611     public short readShort(String JavaDoc description, String JavaDoc[] bitNames, DataInputStream JavaDoc in) throws IOException JavaDoc {
612         short result = in.readShort();
613         if (fVerboseWriter != null) {
614             fVerboseWriter.println(description, result, bitNames);
615         }
616         return result;
617     }
618
619     /**
620      * Reads Jdwp data and, if verbose is on, outputs verbose info.
621      * @return Returns value that has been read.
622      */

623     public int readInt(String JavaDoc description, String JavaDoc[] bitNames, DataInputStream JavaDoc in) throws IOException JavaDoc {
624         int result = in.readInt();
625         if (fVerboseWriter != null) {
626             fVerboseWriter.println(description, result, bitNames);
627         }
628         return result;
629     }
630
631     /**
632      * Writes Jdwp data and, if verbose is on, outputs verbose info.
633      */

634     public void writeByte(byte value, String JavaDoc description, String JavaDoc[] bitNames, DataOutputStream JavaDoc out) throws IOException JavaDoc {
635         out.writeByte(value);
636         if (fVerboseWriter != null) {
637             fVerboseWriter.println(description, value, bitNames);
638         }
639     }
640     
641     /**
642      * @return Returns VerboseWriter where verbose info is written to, null if no verbose must be given.
643      */

644     public VerboseWriter verboseWriter() {
645         return fVerboseWriter;
646     }
647 }
648
Popular Tags