org.exolab.castor.mapping.loader
public class Types extends Object
Version: $Revision: 1.4 $ $Date: 2003/04/23 08:48:20 $
Nested Class Summary | |
---|---|
static class | Types.TypeInfo
Information about a specific Java type. |
Field Summary | |
---|---|
static Types.TypeInfo[] | _typeInfos
List of all the simple types supported by Castor. |
Method Summary | |
---|---|
static Object | getDefault(Class type)
Returns the default value for this Java type (e.g. |
static String | getFullDatePattern(String pattern)
Transforms short date format pattern into full format pattern
for SimpleDateFormat (e.g., "YMD" to "yyyyMMdd").
|
static boolean | isCloneable(Class type)
Returns true if the Java type implements the Cloneable
interface.
|
static boolean | isConstructable(Class type)
Returns true if the objects of this class are constructable.
|
static boolean | isConstructable(Class type, boolean allowAbstractOrInterface)
Returns true if the objects of this class are constructable.
|
static boolean | isImmutable(Class type)
Returns true if the Java type is immutable. |
static boolean | isPrimitiveType(Class type)
Returns true if the Java type is represented as a primitive type. |
static boolean | isSerializable(Class type)
Returns true if the Java type implements the Serializable
interface.
|
static boolean | isSimpleType(Class type)
Returns true if the Java type is represented as a simple type.
|
static Object | newInstance(Class type)
Constructs a new object from the given class. |
static Object | newInstance(Class type, Object[] args)
Constructs a new object from the given class. |
static Class | typeFromName(ClassLoader loader, String typeName)
Returns the class name based on the supplied type name. |
static Class | typeFromPrimitive(Class type)
Maps from a primitive Java type to a Java class. |
Parameters: type The Java type
Returns: The default value or null
Parameters: pattern The short pattern
Returns: The full pattern
Parameters: type The Java type
Returns: True if declared as cloneable
Parameters: type The Java type
Returns: True if constructable
Parameters: type The Java type
Returns: True if constructable
Parameters: type The Java type
Returns: True if immutable type
Parameters: type The Java type
Returns: True if a primitive type
Parameters: type The Java type
Returns: True if declared as serializable
Parameters: type The Java type
Returns: True if a simple type
Throws: IllegalStateException The Java object cannot be constructed
Throws: IllegalStateException The Java object cannot be constructed
Parameters: loader The class loader to use, may be null typeName The type name
Returns: The type class
Throws: ClassNotFoundException The specified class could not be found
From To -------------- --------------- Boolean.TYPE Boolean.class Byte.TYPE Byte.class Character.TYPE Character.class Short.TYPE Short.class Integer.TYPE Integer.class Long.TYPE Long.class Float.TYPE Float.class Double.TYPE Double.class
Parameters: type The Java type (primitive or not)
Returns: A comparable non-primitive Java type