public class AnnotationUtil extends Object
| 构造器和说明 |
|---|
AnnotationUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
equalObjects(Object[] a,
Object[] a2) |
static <T> T |
fillBean(Annotation annotation,
Class<? extends T> tClass) |
static <T> T |
fillBean(Annotation annotation,
T bean) |
static <T> T |
fillDefaultValue(Class<? extends Annotation> enumType,
T object) |
static Object |
fillObject(Annotation annotation,
Object object) |
static Set<Annotation> |
getAllAnnotations(Method method) |
static <T extends Annotation> |
getAllAnnotations(Method method,
Class<T> annotationClass) |
static <T extends Annotation> |
getAllClassAnnotations(Class cClass,
Class<T> annotationClass) |
static Set<Annotation> |
getAllConstructorAnnotations(Constructor constructor) |
static Map |
getAnnotationMap(Object obj) |
static Map |
getAnnotationOtherValue(Annotation annotation) |
static <T extends Annotation> |
getClassAnnotation(Class cClass,
Class<T> annotationClass) |
static <T extends Annotation> |
getClassAnnotation(javassist.CtClass cClass,
Class<T> annotationClass) |
static <T extends Annotation> |
getConstructorAnnotation(Constructor constructor,
Class<T> annotationClass) |
static Object |
getDefaultValue(Class<? extends Annotation> enumType,
String name) |
static Object[] |
getDefaultValues(Class<? extends Annotation> enumType,
String name) |
static <T extends Annotation> |
getMethodAnnotation(javassist.CtMethod method,
Class<T> annotationClass) |
static <T extends Annotation> |
getMethodAnnotation(Method method,
Class<T> annotationClass) |
static Object |
getValue(Annotation annotation,
String name) |
static Object[] |
getValues(Annotation annotation,
String name) |
static String |
toAnnotationStr(Annotation annotation) |
static String |
toAnnotationStr(Class<Annotation> annotationType,
List objs) |
static String |
toAnnotationStr(Object obj) |
static String |
toAnnotationStr(Object obj,
Map<String,Object> defalutMap) |
static StringBuffer |
toAnnotationStr(StringBuffer buffer,
Annotation annotation) |
static StringBuffer |
toReturnStr(Field field) |
static StringBuffer |
toReturnStr(Method method) |
static StringBuffer |
toType(Class type,
Type genericType) |
static StringBuffer |
toType(StringBuffer methodBuffer,
Type type) |
static StringBuffer |
toType(Type type) |
static StringBuffer |
toTypeStr(StringBuffer methodBuffer,
ParameterizedType type) |
static StringBuffer |
toWildcardType(StringBuffer methodBuffer,
WildcardType type) |
protected static final Log logger
public static <T extends Annotation> T getMethodAnnotation(Method method, Class<T> annotationClass)
public static <T extends Annotation> T getMethodAnnotation(javassist.CtMethod method, Class<T> annotationClass) throws ClassNotFoundException
public static <T extends Annotation> T getConstructorAnnotation(Constructor constructor, Class<T> annotationClass)
public static Set<Annotation> getAllConstructorAnnotations(Constructor constructor)
public static <T extends Annotation> T getClassAnnotation(Class cClass, Class<T> annotationClass)
public static <T extends Annotation> T getClassAnnotation(javassist.CtClass cClass, Class<T> annotationClass) throws ClassNotFoundException
public static Set<Annotation> getAllAnnotations(Method method)
public static <T extends Annotation> List<T> getAllAnnotations(Method method, Class<T> annotationClass)
public static <T extends Annotation> List<T> getAllClassAnnotations(Class cClass, Class<T> annotationClass)
public static Object getValue(Annotation annotation, String name)
public static Object[] getValues(Annotation annotation, String name)
public static <T> T fillBean(Annotation annotation, T bean)
public static Object getDefaultValue(Class<? extends Annotation> enumType, String name)
public static Object[] getDefaultValues(Class<? extends Annotation> enumType, String name)
public static <T> T fillDefaultValue(Class<? extends Annotation> enumType, T object)
public static Object fillObject(Annotation annotation, Object object)
public static <T> T fillBean(Annotation annotation, Class<? extends T> tClass)
public static String toAnnotationStr(Class<Annotation> annotationType, List objs)
public static Map getAnnotationOtherValue(Annotation annotation)
public static String toAnnotationStr(Annotation annotation)
public static StringBuffer toAnnotationStr(StringBuffer buffer, Annotation annotation)
public static StringBuffer toTypeStr(StringBuffer methodBuffer, ParameterizedType type)
public static StringBuffer toType(Type type)
public static StringBuffer toType(Class type, Type genericType)
public static StringBuffer toReturnStr(Method method)
public static StringBuffer toReturnStr(Field field)
public static StringBuffer toType(StringBuffer methodBuffer, Type type)
public static StringBuffer toWildcardType(StringBuffer methodBuffer, WildcardType type)
Copyright © 2023 onecode. All rights reserved.