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

java.lang.Object
  extended byorg.apache.jdo.impl.model.java.AbstractJavaType
      extended byorg.apache.jdo.impl.model.java.BaseReflectionJavaType
          extended byorg.apache.jdo.impl.model.java.PredefinedType
              extended byorg.apache.jdo.impl.model.java.PrimitiveType
All Implemented Interfaces:
JavaType
Direct Known Subclasses:
FloatingPointType, IntegralType

public class PrimitiveType
extends PredefinedType

A PrimitiveType instance represents a primitive type as defined in the Java language. There are eight primitive types: boolean, byte, short, int, long, char, float, double.

Class PredefinedType provides public static final variables referring to the JavaType representation for primtive types.

Since:
JDO 1.0.1
Author:
Michael Bouschen
See Also:
PredefinedType.booleanType, PredefinedType.byteType, PredefinedType.shortType, PredefinedType.intType, PredefinedType.longType, PredefinedType.charType, PredefinedType.floatType, PredefinedType.doubleType

Field Summary
 
Fields inherited from class org.apache.jdo.impl.model.java.PredefinedType
abstractCollectionType, abstractListType, abstractMapType, abstractSetType, arrayListType, bigDecimalType, bigIntegerType, bitsetType, booleanClassType, booleanType, byteClassType, byteType, characterClassType, charType, collectionType, dateType, dictionaryType, doubleClassType, doubleType, floatClassType, floatType, hashMapType, hashSetType, hashtableType, integerClassType, intType, linkedListType, listType, localeType, longClassType, longType, mapType, numberType, objectType, propertiesType, setType, shortClassType, shortType, sqlDateType, sqlTimestampType, sqlTimeType, stackType, stringType, treeMapType, treeSetType, vectorType, voidType
 
Fields inherited from class org.apache.jdo.impl.model.java.BaseReflectionJavaType
clazz, superclass
 
Constructor Summary
protected PrimitiveType(java.lang.Class clazz)
          Constructor.
 
Method Summary
 WrapperClassType getWrapperClassType()
          Returns the JavaType instance of the Java wrapper class that corresponds to this primitive type.
 boolean isPrimitive()
          Returns true if this JavaType represents a primitive type.
 boolean isValue()
          Returns true if this JavaType represents a type whoses values may be treated as values rather than refernces during storing.
 
Methods inherited from class org.apache.jdo.impl.model.java.PredefinedType
getPredefinedType, getPredefinedTypes
 
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, isTrackable, isWrapperClass, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrimitiveType

protected PrimitiveType(java.lang.Class clazz)
Constructor.

Parameters:
clazz - the Class instance representing the type
Method Detail

isPrimitive

public boolean isPrimitive()
Returns true if this JavaType represents a primitive type.

Specified by:
isPrimitive in interface JavaType
Overrides:
isPrimitive in class AbstractJavaType
Returns:
true if this JavaTypre represents a primitive type; false otherwise.

isValue

public boolean isValue()
Returns true if this JavaType represents a type whoses values may be treated as values rather than refernces during storing.

Specified by:
isValue in interface JavaType
Overrides:
isValue in class AbstractJavaType
Returns:
true if this JavaType represents a value type; false otherwise.

getWrapperClassType

public WrapperClassType getWrapperClassType()
Returns the JavaType instance of the Java wrapper class that corresponds to this primitive type.

Returns:
the JavaType of the corresponding Java wrapper class.


Copyright © 2005 Apache Software Foundation. All Rights Reserved.