|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jdo.spi.persistence.utility.JavaTypeHelper
public class JavaTypeHelper
This is a helper class which provides some basic java type convenience methods: extraction of a package from a fully qualified class name, extraction of a short (non-qualified) name from a fully qualified class name, and various wrapper and primitive type methods.
| Constructor Summary | |
|---|---|
JavaTypeHelper()
|
|
| Method Summary | |
|---|---|
static String |
getPackageName(String className)
Returns the package portion of the specified class |
static Class |
getPrimitiveClass(String primitiveName)
Returns the primitive class associated with the supplied primitive type name. |
static String |
getPrimitiveName(Class wrapper)
Returns the name of the primitive type associated with the supplied wrapper class. |
static String |
getShortClassName(String className)
Returns the name of a class without the package name. |
static Class |
getWrapperClass(Class primitive)
Returns the wrapper class associated with the supplied primitive class. |
static String |
getWrapperName(String primitiveName)
Returns the name of the wrapper class associated with the supplied primitive type name. |
static Boolean |
valueOf(boolean flag)
Returns the Boolean wrapper object for true or false corresponding to the supplied argument. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JavaTypeHelper()
| Method Detail |
|---|
public static String getPackageName(String className)
className - the name of the class from which to extract the
package
public static String getShortClassName(String className)
className - fully qualified classnamepublic static Class getWrapperClass(Class primitive)
primitive - the primitive class to be used for lookup.
public static Class getPrimitiveClass(String primitiveName)
primitiveName - the name of the primitive to be used for lookup.
public static String getWrapperName(String primitiveName)
primitiveName - the name of the primitive to be used for lookup.
public static String getPrimitiveName(Class wrapper)
wrapper - the wrapper class to be used for lookup.
public static Boolean valueOf(boolean flag)
flag - the primitive boolean object to be translated to a
Boolean wrapper.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||