public final class Reflections extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containField(Set<Field> fields,
Field field) |
static boolean |
containMethod(Set<Method> methods,
Method method) |
static <T> Set<Type> |
getBeanTypes(Class<T> beanClass) |
static Set<Field> |
getHiddenFields(Class<?> clazz) |
static Field |
getHideField(Field superclassField,
Class<?> subclass) |
static Set<Field> |
getInheritedFields(Class<?> clazz) |
static Set<Method> |
getInheritedMethods(Class<?> clazz) |
static Field |
getMatch(Set<Field> fields,
Field field) |
static Method |
getMatch(Set<Method> methods,
Method maybeSuperclassMethod,
boolean matchInheritance) |
static String[] |
getMethodVariableNames(Class<?> clazz,
String targetMethodName,
Class<?>[] types)
Get method variable names of the specified class, target method name and parameter types.
|
static Set<Method> |
getOverriddenMethods(Class<?> clazz) |
static Method |
getOverrideMethod(Method superclassMethod,
Class<?> subclass) |
static Set<Field> |
getOwnFields(Class<?> clazz) |
static Set<Method> |
getOwnMethods(Class<?> clazz) |
static Set<Class<? extends Annotation>> |
getStereotypes(Class<?> clazz)
Gets stereo types of the specified class.
|
static boolean |
hasSameParameterTypes(Method method1,
Method method2) |
static boolean |
isAbstract(Class<?> clazz) |
static boolean |
isAccessable(Package subclassPackage,
Package superclassPackage,
int superMemberModifiers) |
static boolean |
isConcrete(Class<?> clazz) |
static boolean |
isConcrete(Type type) |
static boolean |
isInterface(Class<?> clazz) |
static boolean |
match(Field field1,
Field field2) |
static boolean |
matchInheritance(Field subclassField,
Field superclassField) |
static boolean |
matchInheritance(Method subclassMethod,
Method superclassMethod) |
static boolean |
matchModifier(Method method1,
Method method2) |
static boolean |
matchSignature(Method method1,
Method method2) |
public static Set<Class<? extends Annotation>> getStereotypes(Class<?> clazz)
clazz - the specified classpublic static String[] getMethodVariableNames(Class<?> clazz, String targetMethodName, Class<?>[] types)
clazz - the specific clazztargetMethodName - the specified target method nametypes - the specified parameter typespublic static boolean isConcrete(Type type)
public static boolean isConcrete(Class<?> clazz)
public static boolean isInterface(Class<?> clazz)
public static boolean isAbstract(Class<?> clazz)
public static boolean isAccessable(Package subclassPackage, Package superclassPackage, int superMemberModifiers)
public static Method getMatch(Set<Method> methods, Method maybeSuperclassMethod, boolean matchInheritance)
public static boolean matchInheritance(Method subclassMethod, Method superclassMethod)
Copyright © 2009–2019 B3log. All rights reserved.