01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdi.internal;
11:
12: import java.io.DataOutputStream;
13:
14: import org.eclipse.jdi.internal.jdwp.JdwpID;
15:
16: import com.sun.jdi.Type;
17: import com.sun.jdi.VoidValue;
18:
19: /**
20: * this class implements the corresponding interfaces
21: * declared by the JDI specification. See the com.sun.jdi package
22: * for more information.
23: *
24: */
25: public class VoidValueImpl extends ValueImpl implements VoidValue {
26: /** JDWP Tag. */
27: public static final byte tag = JdwpID.VOID_TAG;
28:
29: /**
30: * Creates new instance.
31: */
32: public VoidValueImpl(VirtualMachineImpl vmImpl) {
33: super ("VoidValue", vmImpl); //$NON-NLS-1$
34: }
35:
36: /**
37: * @returns tag.
38: */
39: public byte getTag() {
40: return tag;
41: }
42:
43: /**
44: * @returns type of value.
45: */
46: public Type type() {
47: return new VoidTypeImpl(virtualMachineImpl());
48: }
49:
50: /**
51: * @return Returns true if two values are equal.
52: * @see java.lang.Object#equals(Object)
53: */
54: public boolean equals(Object object) {
55: return object != null
56: && object.getClass().equals(this .getClass());
57: }
58:
59: /**
60: * @return Returns a has code for this object.
61: * @see java.lang.Object#hashCode
62: */
63: public int hashCode() {
64: return 0;
65: }
66:
67: /**
68: * Writes value without value tag.
69: */
70: public void write(MirrorImpl target, DataOutputStream out) {
71: // Nothing to write.
72: }
73:
74: /**
75: * @return Returns description of Mirror object.
76: */
77: public String toString() {
78: return "(void)"; //$NON-NLS-1$
79: }
80: }
|