org.apache.jdo.impl.model.java
Class PredefinedType

java.lang.Object
  extended by org.apache.jdo.impl.model.java.AbstractJavaType
      extended by org.apache.jdo.impl.model.java.BaseReflectionJavaType
          extended by org.apache.jdo.impl.model.java.PredefinedType
All Implemented Interfaces:
JavaType
Direct Known Subclasses:
JDOSupportedCollectionType, JDOSupportedMapType, PrimitiveType, ValueClassType

public class PredefinedType
extends BaseReflectionJavaType

Instances of this class represent a type that is not a persistence capable class, but is known by JDO. All JavaModel implementation will use this implementation to represnet predefined types. Predefined types include:

This class provides public static fields for all predefined types. These constants are convenience for direct access of a JavaType instance representing a predefined type. The class also manages a map of predefined types using the type name as key. The constructors automatically add the new created instance to this map. Please use method getPredefinedType(String name) to lookup a predefined type by name. Method getPredefinedTypes() returns a view of the map of predefined types.

Since:
JDO 1.0.1
Author:
Michael Bouschen

Field Summary
static PredefinedType abstractCollectionType
          The JavaType instance for the class java.util.AbstractCollection.
static PredefinedType abstractListType
          The JavaType instance for the class java.util.AbstractList.
static PredefinedType abstractMapType
          The JavaType instance for the class java.util.AbstractMap.
static PredefinedType abstractSetType
          The JavaType instance for the class java.util.AbstractSet.
static JDOSupportedCollectionType arrayListType
          The JavaType instance for the class java.util.ArrayList.
static ValueClassType bigDecimalType
          The JavaType instance for the class java.math.BigDecimal.
static ValueClassType bigIntegerType
          The JavaType instance for the class java.math.BigInteger.
static MutableValueClassType bitsetType
          The JavaType instance for the class java.util.BitSet.
static WrapperClassType booleanClassType
          The JavaType instance for the class java.lang.Boolean.
static PrimitiveType booleanType
          The JavaType instance for the primitive type boolean.
static WrapperClassType byteClassType
          The JavaType instance for the class java.lang.Byte.
static IntegralType byteType
          The JavaType instance for the integral type byte.
static WrapperClassType characterClassType
          The JavaType instance for the class java.lang.Character.
static IntegralType charType
          The JavaType instance for the integral type char.
static JDOSupportedCollectionType collectionType
          The JavaType instance for the interface java.util.Collection.
static MutableValueClassType dateType
          The JavaType instance for the class java.util.Date.
static PredefinedType dictionaryType
          The JavaType instance for the class java.util.Dictionary.
static WrapperClassType doubleClassType
          The JavaType instance for the class java.lang.Double.
static FloatingPointType doubleType
          The JavaType instance for the floating point type double.
static WrapperClassType floatClassType
          The JavaType instance for the class java.lang.Float.
static FloatingPointType floatType
          The JavaType instance for the floating point type float.
static JDOSupportedMapType hashMapType
          The JavaType instance for the class java.util.HashMap.
static JDOSupportedCollectionType hashSetType
          The JavaType instance for the class java.util.HashSet.
static JDOSupportedMapType hashtableType
          The JavaType instance for the class java.util.Hashtable.
static WrapperClassType integerClassType
          The JavaType instance for the class java.lang.Integer.
static IntegralType intType
          The JavaType instance for the integral type int.
static JDOSupportedCollectionType linkedListType
          The JavaType instance for the class java.util.LinkedList.
static JDOSupportedCollectionType listType
          The JavaType instance for the interface java.util.List.
static ValueClassType localeType
          The JavaType instance for the class java.lang.Locale.
static WrapperClassType longClassType
          The JavaType instance for the class java.lang.Long.
static IntegralType longType
          The JavaType instance for the integral type long.
static JDOSupportedMapType mapType
          The JavaType instance for the interface java.util.Map.
static ValueClassType numberType
          The JavaType instance for the class java.lang.Numer.
static PredefinedType objectType
          The JavaType instance for the class java.lang.Object.
static JDOSupportedMapType propertiesType
          The JavaType instance for the class java.util.Properties.
static JDOSupportedCollectionType setType
          The JavaType instance for the interface java.util.Set.
static WrapperClassType shortClassType
          The JavaType instance for the class java.lang.Short.
static IntegralType shortType
          The JavaType instance for the integral type short.
static MutableValueClassType sqlDateType
          The JavaType instance for the class java.sql.Date.
static MutableValueClassType sqlTimestampType
          The JavaType instance for the class java.sql.Timestamp.
static MutableValueClassType sqlTimeType
          The JavaType instance for the class java.sql.Time.
static JDOSupportedCollectionType stackType
          The JavaType instance for the class java.util.Stack.
static ValueClassType stringType
          The JavaType instance for the class java.lang.String.
static JDOSupportedMapType treeMapType
          The JavaType instance for the class java.util.TreeMap.
static JDOSupportedCollectionType treeSetType
          The JavaType instance for the class java.util.TreeSet.
static JDOSupportedCollectionType vectorType
          The JavaType instance for the class java.util.Vector.
static PredefinedType voidType
          The JavaType instance for the type void.
 
Fields inherited from class org.apache.jdo.impl.model.java.BaseReflectionJavaType
clazz, superclass
 
Constructor Summary
protected PredefinedType(java.lang.Class clazz)
          Constructor taking a Class instance.
protected PredefinedType(java.lang.Class clazz, JavaType superclass)
          Constructor taking a Class instance and a JavaType representing the superclass of the new JavaType instance.
 
Method Summary
static JavaType getPredefinedType(java.lang.String name)
          Returns the JavaType instance for a predefined type with the specified name.
static java.util.Map getPredefinedTypes()
          Returns an unmodifiable view of the predefined types map.
 
Methods inherited from class org.apache.jdo.impl.model.java.BaseReflectionJavaType
getJavaClass, getJavaField, getModifiers, getName, getSuperclass, isCompatibleWith, isInterface
 
Methods inherited from class org.apache.jdo.impl.model.java.AbstractJavaType
equals, getArrayComponentType, getJDOClass, hashCode, isArray, isFloatingPoint, isIntegral, isJDOSupportedCollection, isJDOSupportedMap, isOrderable, isPersistenceCapable, isPrimitive, isTrackable, isValue, isWrapperClass, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

objectType

public static final PredefinedType objectType
The JavaType instance for the class java.lang.Object.


voidType

public static final PredefinedType voidType
The JavaType instance for the type void.


booleanType

public static final PrimitiveType booleanType
The JavaType instance for the primitive type boolean.


byteType

public static final IntegralType byteType
The JavaType instance for the integral type byte.


shortType

public static final IntegralType shortType
The JavaType instance for the integral type short.


intType

public static final IntegralType intType
The JavaType instance for the integral type int.


longType

public static final IntegralType longType
The JavaType instance for the integral type long.


charType

public static final IntegralType charType
The JavaType instance for the integral type char.


floatType

public static final FloatingPointType floatType
The JavaType instance for the floating point type float.


doubleType

public static final FloatingPointType doubleType
The JavaType instance for the floating point type double.


numberType

public static final ValueClassType numberType
The JavaType instance for the class java.lang.Numer.


stringType

public static final ValueClassType stringType
The JavaType instance for the class java.lang.String.


localeType

public static final ValueClassType localeType
The JavaType instance for the class java.lang.Locale.


bigDecimalType

public static final ValueClassType bigDecimalType
The JavaType instance for the class java.math.BigDecimal.


bigIntegerType

public static final ValueClassType bigIntegerType
The JavaType instance for the class java.math.BigInteger.


booleanClassType

public static final WrapperClassType booleanClassType
The JavaType instance for the class java.lang.Boolean.


byteClassType

public static final WrapperClassType byteClassType
The JavaType instance for the class java.lang.Byte.


shortClassType

public static final WrapperClassType shortClassType
The JavaType instance for the class java.lang.Short.


integerClassType

public static final WrapperClassType integerClassType
The JavaType instance for the class java.lang.Integer.


longClassType

public static final WrapperClassType longClassType
The JavaType instance for the class java.lang.Long.


characterClassType

public static final WrapperClassType characterClassType
The JavaType instance for the class java.lang.Character.


floatClassType

public static final WrapperClassType floatClassType
The JavaType instance for the class java.lang.Float.


doubleClassType

public static final WrapperClassType doubleClassType
The JavaType instance for the class java.lang.Double.


dateType

public static final MutableValueClassType dateType
The JavaType instance for the class java.util.Date.


sqlDateType

public static final MutableValueClassType sqlDateType
The JavaType instance for the class java.sql.Date.


sqlTimeType

public static final MutableValueClassType sqlTimeType
The JavaType instance for the class java.sql.Time.


sqlTimestampType

public static final MutableValueClassType sqlTimestampType
The JavaType instance for the class java.sql.Timestamp.


bitsetType

public static final MutableValueClassType bitsetType
The JavaType instance for the class java.util.BitSet.


collectionType

public static final JDOSupportedCollectionType collectionType
The JavaType instance for the interface java.util.Collection.


setType

public static final JDOSupportedCollectionType setType
The JavaType instance for the interface java.util.Set.


listType

public static final JDOSupportedCollectionType listType
The JavaType instance for the interface java.util.List.


abstractCollectionType

public static final PredefinedType abstractCollectionType
The JavaType instance for the class java.util.AbstractCollection.


abstractSetType

public static final PredefinedType abstractSetType
The JavaType instance for the class java.util.AbstractSet.


hashSetType

public static final JDOSupportedCollectionType hashSetType
The JavaType instance for the class java.util.HashSet.


treeSetType

public static final JDOSupportedCollectionType treeSetType
The JavaType instance for the class java.util.TreeSet.


abstractListType

public static final PredefinedType abstractListType
The JavaType instance for the class java.util.AbstractList.


arrayListType

public static final JDOSupportedCollectionType arrayListType
The JavaType instance for the class java.util.ArrayList.


linkedListType

public static final JDOSupportedCollectionType linkedListType
The JavaType instance for the class java.util.LinkedList.


vectorType

public static final JDOSupportedCollectionType vectorType
The JavaType instance for the class java.util.Vector.


stackType

public static final JDOSupportedCollectionType stackType
The JavaType instance for the class java.util.Stack.


mapType

public static final JDOSupportedMapType mapType
The JavaType instance for the interface java.util.Map.


abstractMapType

public static final PredefinedType abstractMapType
The JavaType instance for the class java.util.AbstractMap.


hashMapType

public static final JDOSupportedMapType hashMapType
The JavaType instance for the class java.util.HashMap.


dictionaryType

public static final PredefinedType dictionaryType
The JavaType instance for the class java.util.Dictionary.


hashtableType

public static final JDOSupportedMapType hashtableType
The JavaType instance for the class java.util.Hashtable.


propertiesType

public static final JDOSupportedMapType propertiesType
The JavaType instance for the class java.util.Properties.


treeMapType

public static final JDOSupportedMapType treeMapType
The JavaType instance for the class java.util.TreeMap.

Constructor Detail

PredefinedType

protected PredefinedType(java.lang.Class clazz)
Constructor taking a Class instance. It automatically adds a predefined type to the static map of all predefined types.

Parameters:
clazz - the Class instance for this JavaType

PredefinedType

protected PredefinedType(java.lang.Class clazz,
                         JavaType superclass)
Constructor taking a Class instance and a JavaType representing the superclass of the new JavaType instance. It automatically adds a predefined type to the static map of all predefined types.

Parameters:
clazz - the Class instance for this JavaType
superclass - the JavaType representing the superclass or null if there is no superclass.
Method Detail

getPredefinedType

public static JavaType getPredefinedType(java.lang.String name)
Returns the JavaType instance for a predefined type with the specified name. The method return null if the specified name does not denote a predefined type.

Parameters:
name - the name of the predefined type.
Returns:
the JavaType instance for the specified predefined type.

getPredefinedTypes

public static java.util.Map getPredefinedTypes()
Returns an unmodifiable view of the predefined types map. This map maps type names to JavaType instances.

Returns:
an unmodifiable view of the predefined types map.


Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.