|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.bea.domingo.map.ClassUtilities
final class ClassUtilities
Utility methods for querying Class objects.
Method Summary | |
---|---|
static java.lang.Class |
classForNameOrPrimitive(java.lang.String name,
java.lang.ClassLoader loader)
|
static boolean |
classIsAccessible(java.lang.Class aClass)
|
static boolean |
compatibleClasses(java.lang.Class[] lhs,
java.lang.Class[] rhs)
Tells whether instances of the classes in the 'rhs' array could be used as parameters to a reflective method invocation whose parameter list has types denoted by the 'lhs' array. |
static java.lang.reflect.Method |
getAccessibleMethodFrom(java.lang.Class aClass,
java.lang.String methodName,
java.lang.Class[] parameterTypes)
|
static java.lang.Class |
primitiveEquivalentOf(java.lang.Class aClass)
|
static boolean |
primitiveIsAssignableFrom(java.lang.Class lhs,
java.lang.Class rhs)
Tells whether an instance of the primitive class represented by 'rhs' can be assigned to an instance of the primitive class represented by 'lhs'. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.Class classForNameOrPrimitive(java.lang.String name, java.lang.ClassLoader loader) throws java.lang.ClassNotFoundException
name
- FQN of a class, or the name of a primitive typeloader
- a ClassLoader
java.lang.ClassNotFoundException
- if name names an unknown class or
primitivepublic static boolean classIsAccessible(java.lang.Class aClass)
aClass
- a Class
public static boolean compatibleClasses(java.lang.Class[] lhs, java.lang.Class[] rhs)
lhs
- Class array representing the types of the formal parameters of
a methodrhs
- Class array representing the types of the actual parameters of
a method. A null value or Void.TYPE is considered to match a
corresponding Object or array class in lhs, but not a
primitive.
public static java.lang.reflect.Method getAccessibleMethodFrom(java.lang.Class aClass, java.lang.String methodName, java.lang.Class[] parameterTypes)
aClass
- a ClassmethodName
- name of a methodparameterTypes
- Class array representing the types of a method's formal
parameters
public static java.lang.Class primitiveEquivalentOf(java.lang.Class aClass)
aClass
- a Class
public static boolean primitiveIsAssignableFrom(java.lang.Class lhs, java.lang.Class rhs)
lhs
- assignee classrhs
- assigned class
null
, or one of the parameters does not represent
a primitive (e.g. Byte.TYPE), returns false.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |