org.apache.jdo.impl.model.java
Class NullType
java.lang.Object
org.apache.jdo.impl.model.java.AbstractJavaType
org.apache.jdo.impl.model.java.NullType
- All Implemented Interfaces:
- JavaType
- public class NullType
- extends AbstractJavaType
An instance of class NullType represents the type of the null expression
in Java. It is compatible to all reference types.
- Since:
- JDO 1.0.1
- Author:
- Michael Bouschen
Constructor Summary |
protected |
NullType()
Creates new a NullType instance. |
Method Summary |
java.lang.String |
getName()
Returns the name of the type. |
boolean |
isCompatibleWith(JavaType javaType)
Returns true if this JavaType is compatible with the specified
JavaType. |
Methods inherited from class org.apache.jdo.impl.model.java.AbstractJavaType |
equals, getArrayComponentType, getJavaField, getJDOClass, getModifiers, getSuperclass, hashCode, isArray, isFloatingPoint, isIntegral, isInterface, isJDOSupportedCollection, isJDOSupportedMap, isOrderable, isPersistenceCapable, isPrimitive, isTrackable, isValue, isWrapperClass, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
nullType
public static final NullType nullType
- The singleton NullType instance.
NullType
protected NullType()
- Creates new a NullType instance. This constructor should not be
called directly; instead, the singleton instance
nullType
should be used.
isCompatibleWith
public boolean isCompatibleWith(JavaType javaType)
- Returns true if this JavaType is compatible with the specified
JavaType. This implementation returns
true
, if the
specified javaType is a not a primitive type, because the type of
null is compatiple with all reference types.
- Specified by:
isCompatibleWith
in interface JavaType
- Overrides:
isCompatibleWith
in class AbstractJavaType
- Parameters:
javaType
- the type this JavaType is checked with.
- Returns:
true
if this is compatible with the specified
type; false
otherwise.
getName
public java.lang.String getName()
- Returns the name of the type.
- Specified by:
getName
in interface JavaType
- Specified by:
getName
in class AbstractJavaType
- Returns:
- type name
Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.