|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.craftforge.reflection.utils.ClassUtils
public class ClassUtils
Provides utilities for class-related reflection operations.
| Constructor Summary | |
|---|---|
ClassUtils()
|
|
| Method Summary | |
|---|---|
static List<Class<?>> |
getClassHierarchy(Class<?> c)
Gets a class hierarchy of a class as a list containing the class itself and all its super classes except of java.lang.Object. |
static Method |
getFirstImplementation(Class<?> c,
Method method)
Looks for the first implementation or overriding of a method within the class hierarchy of the given class. |
static List<Class<?>> |
getInterfaceHierarchy(Class<?> c)
Gets a interface hierarchy of a class as a list containing the class's implemented interfaces and all their super interfaces. |
static boolean |
isMethodExchangeableBy(Method method,
Method candidateMethod)
Compares the name and parameters of both methods with each other and looks for the method parameters to be compatible with the candidate method parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassUtils()
| Method Detail |
|---|
public static List<Class<?>> getClassHierarchy(Class<?> c)
c - The class
public static List<Class<?>> getInterfaceHierarchy(Class<?> c)
c - The class
public static Method getFirstImplementation(Class<?> c,
Method method)
c - The class to look within the class hierarchymethod - The implemented or overridden method
public static boolean isMethodExchangeableBy(Method method,
Method candidateMethod)
method - The methodcandidateMethod - The candidate method
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||