org.objectweb.jonas_ejb.lib.JavaType Class Reference

List of all members.

Static Public Member Functions

boolean isVoid (Class c)
String getName (Class c)
boolean isSerializable (Class c)
boolean isValidForRmi (Class c)
boolean isCollecOrEnum (Class c)
String getSQLGetMethod (Class c)
String getSQLSetMethod (Class c)
boolean isXxxObjectMethod (String name)
String getSQLType (Class c)
String getDefaultValue (Class c)
String toStringObject (String name, Class c)

Detailed Description

This class implements methods which permit to get informations about Java Types:
(The Java Type may be or not a primitive type)

Author:
Helene Joanin : Initial developer

ico.Hoogervorst@nl.compuware.com : Support for BigInteger and avoid cast exceptions with rs.getObject()

Definition at line 47 of file JavaType.java.


Member Function Documentation

String org.objectweb.jonas_ejb.lib.JavaType.getDefaultValue Class  c  )  [static]
 

Returns the default value of the given Java Type.

Parameters:
c the class object for a Java type.
Returns:
the default value of the given Java Type

Definition at line 158 of file JavaType.java.

String org.objectweb.jonas_ejb.lib.JavaType.getName Class  c  )  [static]
 

Returns the name of the given type

Definition at line 72 of file JavaType.java.

String org.objectweb.jonas_ejb.lib.JavaType.getSQLGetMethod Class  c  )  [static]
 

Returns the name of the getXXX method associated with the given type in java.sql.ResultSet.

Parameters:
c the class object for a Java type.
Returns:
a string representing the name of the get method, null in error case

Definition at line 123 of file JavaType.java.

String org.objectweb.jonas_ejb.lib.JavaType.getSQLSetMethod Class  c  )  [static]
 

Returns the name of the setXXX method associated with the given type in java.sql.ResultSet.

Parameters:
c the class object for a Java type.
Returns:
a string representing the name of the set method, null in error case

Definition at line 133 of file JavaType.java.

String org.objectweb.jonas_ejb.lib.JavaType.getSQLType Class  c  )  [static]
 

Returns the SQL Type mapping the given Java Type.

Parameters:
c the class object for a Java type.
Returns:
the SQL Type mapping the given Java Type, (Types.OTHER in error case)

Definition at line 149 of file JavaType.java.

boolean org.objectweb.jonas_ejb.lib.JavaType.isCollecOrEnum Class  c  )  [static]
 

Returns true if the given class implements java.uti.Collection or java.util.Enumeration false otherwise.

Definition at line 113 of file JavaType.java.

boolean org.objectweb.jonas_ejb.lib.JavaType.isSerializable Class  c  )  [static]
 

Returns true if the given class is a Serializable Java Type, false otherwise.

Definition at line 87 of file JavaType.java.

boolean org.objectweb.jonas_ejb.lib.JavaType.isValidForRmi Class  c  )  [static]
 

Returns true if the given class is a valid type for RMI, false otherwise. Valid types for RMI are primitive types, remote objects, and non-remote objects that implement the java.io.Serializable interface

Definition at line 105 of file JavaType.java.

boolean org.objectweb.jonas_ejb.lib.JavaType.isVoid Class  c  )  [static]
 

Returns true if the given type is the type 'void'

Definition at line 65 of file JavaType.java.

boolean org.objectweb.jonas_ejb.lib.JavaType.isXxxObjectMethod String  name  )  [static]
 

Returns true if the given method name is getObject() or setObject()

Definition at line 140 of file JavaType.java.

String org.objectweb.jonas_ejb.lib.JavaType.toStringObject String  name,
Class  c
[static]
 

If it is a primitive type, return a new Object constructor, else return the same object. There are nine predefined Class objects to represent the eight primitive types and void. These are created by the Java Virtual Machine, and have the same names as the primitive types that they represent, namely boolean, byte, char, short, int, long, float, and double.

Parameters:
name name of the var
val the object value
Returns:
new object

Definition at line 210 of file JavaType.java.


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:12:04 2005 for JOnAS by  doxygen 1.3.9.1