|
Spring Data Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.repository.util.ClassUtils
public abstract class ClassUtils
Utility class to work with classes.
Method Summary | |
---|---|
static void |
assertReturnTypeAssignable(Method method,
Class<?>... types)
Asserts the given Method 's return type to be one of the given types. |
static int |
getNumberOfOccurences(Method method,
Class<?> type)
Returns the number of occurences of the given type in the given Method s parameters. |
static boolean |
hasParameterOfType(Method method,
Class<?> type)
Returns whether the given Method has a parameter of the given type. |
static boolean |
hasProperty(Class<?> type,
String property)
Returns whether the given class contains a property with the given name. |
static boolean |
isGenericRepositoryInterface(Class<?> interfaze)
Returns wthere the given type is the Repository interface. |
static boolean |
isGenericRepositoryInterface(String interfaceName)
Returns whether the given type name is a repository interface name. |
static boolean |
isOfType(Object object,
Collection<Class<?>> types)
Returns whether the given object is of one of the given types. |
static void |
unwrapReflectionException(Exception ex)
Helper method to extract the original exception that can possibly occur during a reflection call. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean hasProperty(Class<?> type, String property)
type
- property
-
public static boolean isGenericRepositoryInterface(Class<?> interfaze)
Repository
interface.
interfaze
-
public static boolean isGenericRepositoryInterface(String interfaceName)
interfaceName
-
public static int getNumberOfOccurences(Method method, Class<?> type)
Method
s parameters.
method
- type
-
public static void assertReturnTypeAssignable(Method method, Class<?>... types)
Method
's return type to be one of the given types.
method
- types
- public static boolean isOfType(Object object, Collection<Class<?>> types)
object
- types
-
public static boolean hasParameterOfType(Method method, Class<?> type)
Method
has a parameter of the given type.
method
- type
-
public static void unwrapReflectionException(Exception ex) throws Throwable
ex
-
Throwable
|
Spring Data Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |