org.aksw.commons.util.reflect
Class ClassUtils

java.lang.Object
  extended by org.aksw.commons.util.reflect.ClassUtils

public class ClassUtils
extends Object

Author:
Claus Stadler Date: 6/3/11

Constructor Summary
ClassUtils()
           
 
Method Summary
static Object forceInvoke(Method m, Object[] args)
           
static Object forceInvoke(Object o, Method m, Object[] args)
           
static List<Method> getAllNonOverriddenlMethods(Class<?> clazz)
          Returns all non-overridden methods for the given class.
static Integer[] getDistance(Class<?>[] a, Class<?>[] b)
           
static Integer getDistance(Class<?> given, Class<?> there)
          Returns the minimum distance of two classes in an inheritance hierarchy Null if there is no distance
static Integer[] getDistance(Class<?> ra, Class<?> rb, Class<?>[] a, Class<?>[] b)
          Including return types
static Integer getRelation(Integer[] a, Integer[] b)
           
static Class<?>[] getTypeSignature(Object[] args)
           
static List<Class<?>> getTypeSignatureList(Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassUtils

public ClassUtils()
Method Detail

forceInvoke

public static Object forceInvoke(Method m,
                                 Object[] args)

forceInvoke

public static Object forceInvoke(Object o,
                                 Method m,
                                 Object[] args)

getDistance

public static Integer getDistance(Class<?> given,
                                  Class<?> there)
Returns the minimum distance of two classes in an inheritance hierarchy Null if there is no distance


getTypeSignatureList

public static List<Class<?>> getTypeSignatureList(Object[] args)

getTypeSignature

public static Class<?>[] getTypeSignature(Object[] args)

getDistance

public static Integer[] getDistance(Class<?>[] a,
                                    Class<?>[] b)

getDistance

public static Integer[] getDistance(Class<?> ra,
                                    Class<?> rb,
                                    Class<?>[] a,
                                    Class<?>[] b)
Including return types

Parameters:
ra -
rb -
a -
b -
Returns:

getRelation

public static Integer getRelation(Integer[] a,
                                  Integer[] b)
Parameters:
a -
b -
Returns:
L, LE, E, GE, G, Mixed

getAllNonOverriddenlMethods

public static List<Method> getAllNonOverriddenlMethods(Class<?> clazz)
Returns all non-overridden methods for the given class.

Parameters:
clazz -
Returns:


Copyright © 2012. All Rights Reserved.