| package org.eclipse.jdt.internal.debug.core.model; |
| |
| /* |
| * (c) Copyright IBM Corp. 2000, 2001. |
| * All Rights Reserved. |
| */ |
| |
| import java.util.Collections; |
| import java.util.List; |
| |
| import org.eclipse.debug.core.DebugException; |
| import org.eclipse.jdt.debug.core.IJavaType; |
| |
| /** |
| * Represents a value of "null" |
| */ |
| public class JDINullValue extends JDIValue { |
| |
| |
| public JDINullValue(JDIDebugTarget target) { |
| super(target, null); |
| } |
| |
| protected List getVariablesList() { |
| return Collections.EMPTY_LIST; |
| } |
| |
| /** |
| * @see IValue#getReferenceTypeName() |
| */ |
| public String getReferenceTypeName() { |
| return "null"; //$NON-NLS-1$ |
| } |
| |
| /** |
| * @see IValue#getValueString() |
| */ |
| public String getValueString() { |
| return "null"; //$NON-NLS-1$ |
| } |
| |
| /** |
| * @see IJavaValue#getSignature() |
| */ |
| public String getSignature() { |
| return null; |
| } |
| |
| /** |
| * @see IJavaValue#getArrayLength() |
| */ |
| public int getArrayLength() { |
| return -1; |
| } |
| |
| /** |
| * @see IJavaValue#getJavaType() |
| */ |
| public IJavaType getJavaType() throws DebugException { |
| return null; |
| } |
| |
| /** |
| * @see Object#equals(Object) |
| */ |
| public boolean equals(Object obj) { |
| return obj instanceof JDINullValue; |
| } |
| |
| /** |
| * @see Object#hashCode() |
| */ |
| public int hashCode() { |
| return getClass().hashCode(); |
| } |
| |
| } |