|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ferri.core.utils.ClazzUtils
public abstract class ClazzUtils
Constructor Summary | |
---|---|
ClazzUtils()
|
Method Summary | |
---|---|
static Type |
getEntityType(Class<?> genericClazz,
Class<?> expectedGenericParent)
Obtain the expected type from the generic parent. |
static Type |
getEntityType(Class<?> genericClazz,
Class<?> expectedGenericParent,
Integer expectedIndex)
Obtain the expected type from the generic parent |
static Type |
getSelectedType(Type[] types,
Integer paramIndex)
Obtain the expecte type from the given array types When the type have duplicates an index is necesary. |
static Class<?> |
getTopClass(Class<?> currentClazz,
Class<?> expectedParent)
Obtain the expected parent from the given class instance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClazzUtils()
Method Detail |
---|
public static Type getEntityType(Class<?> genericClazz, Class<?> expectedGenericParent) throws GenericClassNotFound, GenericTypeNotFound
genericClazz
- the given class that inherit from a generic parent clazz.expectedGenericParent
- the generic parent class to match.expectedType
- the type to match
GenericClassNotFound
- if the given class dont have the expected parent class
GenericTypeNotFound
- if the given type is not foundpublic static Type getEntityType(Class<?> genericClazz, Class<?> expectedGenericParent, Integer expectedIndex) throws GenericClassNotFound, GenericTypeNotFound
genericClazz
- the given class that inherit from a generic parent clazz.expectedGenericParent
- the generic parent class to match.expectedType
- the type to matchexpectedIndex
- the index of the type to match if has more than one
GenericClassNotFound
- if the given class dont have the expected parent class
GenericTypeNotFound
- if the given type is not foundpublic static Type getSelectedType(Type[] types, Integer paramIndex) throws GenericTypeNotFound
types
- the allowed array typeexpectedType
- the type to match.paramIndex
- the index start at 1
GenericTypeNotFound
- if the given type is not foundpublic static Class<?> getTopClass(Class<?> currentClazz, Class<?> expectedParent)
currentClazz
- the given class instanceexpectedParent
- the parent to match
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |