|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.util.ClassUtil
public class ClassUtil
Utility class for Class objects.
| Constructor Summary | |
|---|---|
ClassUtil()
|
|
| Method Summary | ||
|---|---|---|
static
|
findConstructor(Class<I> clazz,
Object[] parameters)
Find a constructor for the specified class which takes parameters of the specified types taking superclasses and interfaces into account. |
|
static Set<Class> |
getInterfaces(Class clazz)
Get all interfaces a class implements, including those implemented by superclasses. |
|
static boolean |
isAssignable(Class<?>[] classes,
Object[] values)
Check if one array of class objects is assignment compatible with values in another array. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassUtil()
| Method Detail |
|---|
public static <I> Constructor<I> findConstructor(Class<I> clazz,
Object[] parameters)
clazz - The class to find a constructor forparameters - The parameters that are going to be sent to the
constructor's Constructor.newInstance(Object[]) method
public static boolean isAssignable(Class<?>[] classes,
Object[] values)
Class.isAssignableFrom(Class) method
returns true for each element in the classes array with
respect to the class of the corresponding value in the
values array. Null elements in the values
array are ignored.
classes - The class objects representing the parameters we want to
assign values tovalues - The parameter values to assign
public static Set<Class> getInterfaces(Class clazz)
clazz - The Class to check
Set containing the Class objects
for the interfaces
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||