org.apache.jdo.tck.util.signature
Class TypeHelper

java.lang.Object
  extended byorg.apache.jdo.tck.util.signature.TypeHelper

public class TypeHelper
extends java.lang.Object

A helper class for translating between Java user type names and reflection type names.


Constructor Summary
TypeHelper()
           
 
Method Summary
static java.lang.String componentUserTypeName(java.lang.String name)
          Returns the component type name of a (Java) user type name.
static boolean isNameMatch(java.lang.String[] userTypeName, java.lang.Class[] cls)
          Compares an array of type names with an array of class objects for set-equality in the names (i.e., ignoring order).
static boolean isNameMatch(java.lang.String userTypeName, java.lang.Class cls)
          Compares a type name with a class objects for equality in the name.
static boolean isPrimitive(java.lang.String name)
          Tests if a name denotes a primitive type.
static java.lang.Class primitiveClass(java.lang.String name)
          Returns the class object for a primitive type name, or null if the name does not denote a primitive type (class objects of primitive types cannot be loaded with reflection).
static java.lang.String qualifiedUserTypeName(java.lang.String name)
          Returns the java.lang.-qualified name for a given unqualified (Java) user type name.
static java.lang.String[] qualifiedUserTypeNames(java.lang.String[] names)
          Returns the java.lang.-qualified names for given unqualified (Java) user type names.
static java.lang.String reflectionTypeName(java.lang.String name)
          Returns the reflection name for a (Java) user type name.
static java.lang.String[] reflectionTypeNames(java.lang.String[] names)
          Returns the (Java) user names for reflection type names.
static java.lang.String userTypeName(java.lang.String name)
          Returns the (Java) user name for a reflection type name.
static java.lang.String[] userTypeNames(java.lang.String[] names)
          Returns the (Java) user names for reflection type names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeHelper

public TypeHelper()
Method Detail

userTypeName

public static java.lang.String userTypeName(java.lang.String name)
Returns the (Java) user name for a reflection type name.


userTypeNames

public static java.lang.String[] userTypeNames(java.lang.String[] names)
Returns the (Java) user names for reflection type names.


reflectionTypeName

public static java.lang.String reflectionTypeName(java.lang.String name)
Returns the reflection name for a (Java) user type name.


reflectionTypeNames

public static java.lang.String[] reflectionTypeNames(java.lang.String[] names)
Returns the (Java) user names for reflection type names.


primitiveClass

public static java.lang.Class primitiveClass(java.lang.String name)
Returns the class object for a primitive type name, or null if the name does not denote a primitive type (class objects of primitive types cannot be loaded with reflection).


isPrimitive

public static boolean isPrimitive(java.lang.String name)
Tests if a name denotes a primitive type.


componentUserTypeName

public static java.lang.String componentUserTypeName(java.lang.String name)
Returns the component type name of a (Java) user type name.


qualifiedUserTypeName

public static java.lang.String qualifiedUserTypeName(java.lang.String name)
Returns the java.lang.-qualified name for a given unqualified (Java) user type name.


qualifiedUserTypeNames

public static java.lang.String[] qualifiedUserTypeNames(java.lang.String[] names)
Returns the java.lang.-qualified names for given unqualified (Java) user type names.


isNameMatch

public static boolean isNameMatch(java.lang.String userTypeName,
                                  java.lang.Class cls)
Compares a type name with a class objects for equality in the name.


isNameMatch

public static boolean isNameMatch(java.lang.String[] userTypeName,
                                  java.lang.Class[] cls)
Compares an array of type names with an array of class objects for set-equality in the names (i.e., ignoring order).



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