KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > debug > core > model > JDIVoidValue


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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.jdt.internal.debug.core.model;
12
13  
14 import java.util.Collections JavaDoc;
15 import java.util.List JavaDoc;
16
17 import org.eclipse.jdt.debug.core.IJavaType;
18
19 /**
20  * Represents a value of "void"
21  */

22 public class JDIVoidValue extends JDIValue {
23     
24     
25     public JDIVoidValue(JDIDebugTarget target) {
26         super(target, target.getVM().mirrorOfVoid());
27     }
28
29     protected List JavaDoc getVariablesList() {
30         return Collections.EMPTY_LIST;
31     }
32     
33     /**
34      * @see IValue#getReferenceTypeName()
35      */

36     public String JavaDoc getReferenceTypeName() {
37         return "void"; //$NON-NLS-1$
38
}
39     
40     /**
41      * @see IValue#getValueString()
42      */

43     public String JavaDoc getValueString() {
44         return "null"; //$NON-NLS-1$
45
}
46
47     /**
48      * @see IJavaValue#getSignature()
49      */

50     public String JavaDoc getSignature() {
51         return "V"; //$NON-NLS-1$
52
}
53
54     /**
55      * @see IJavaValue#getArrayLength()
56      */

57     public int getArrayLength() {
58         return -1;
59     }
60         
61     /**
62      * @see IJavaValue#getJavaType()
63      */

64     public IJavaType getJavaType() {
65         return new JDIVoidType((JDIDebugTarget)getDebugTarget());
66     }
67     /**
68      * @see java.lang.Object#toString()
69      */

70     public String JavaDoc toString() {
71         return "void"; //$NON-NLS-1$
72
}
73 }
74
Popular Tags