public final class ReflectionUtil extends Object
| Modifier and Type | Method and Description | 
|---|---|
| static boolean | containsInterface(Class<?> target,
                 Class<?> clazz)Determine if the target class implements the provided interface. | 
| static Set<Class<?>> | getAllInterfaces(Class<?> target)Builds a  Setof interfaces from the target class. | 
| static <T> List<Class<? extends T>> | getInterfaces(Class<?> target,
             Class<T> type)Get all interfaces the extends the type provided. | 
| static String | getMethodName(int depth)Determine the method name for the calling class. | 
| static String | getPackage(Class<?> clazz)Returns the package the class is associated with. | 
| static boolean | overridesEqualsAndHashcode(Class<?> clazz)Returns true if the given class overrides equals and hashCode. | 
public static Set<Class<?>> getAllInterfaces(Class<?> target)
Set of interfaces from the target class.public static boolean containsInterface(Class<?> target, Class<?> clazz)
target - class to look through for a matching interface.clazz - interface class to look for.public static <T> List<Class<? extends T>> getInterfaces(Class<?> target, Class<T> type)
public static boolean overridesEqualsAndHashcode(Class<?> clazz)
clazz - The class to check.public static String getPackage(Class<?> clazz)
clazz - class to inspect for the package.NullPointerException - if clazz is null.public static String getMethodName(int depth)
Copyright © 2019. All rights reserved.