public class JavassistUtils extends Object
Constructor and Description |
---|
JavassistUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addClassAnnotation(javassist.CtClass clazz,
Class<?> annotationClass,
Object... values) |
static void |
addMethodAnnotations(javassist.CtMethod ctMethod,
Method method) |
static void |
addResourceAnnotation(javassist.CtField field,
String beanName) |
static javassist.bytecode.annotation.Annotation |
cloneAnnotation(javassist.bytecode.ConstPool constPool,
Annotation annotation)
Clone an annotation and all of it's methods
|
static void |
copyTypeAnnotations(Class<?> fromClass,
javassist.CtClass toClass) |
static javassist.bytecode.annotation.MemberValue |
createMemberValue(javassist.bytecode.ConstPool constPool,
Object val) |
static javassist.bytecode.AnnotationsAttribute |
getAnnotationsAttribute(javassist.bytecode.ClassFile ccFile) |
static List<Method> |
getMethodsAnnotatedWith(Class<?> type,
Class<? extends Annotation> annotation) |
public static void addClassAnnotation(javassist.CtClass clazz, Class<?> annotationClass, Object... values)
public static javassist.bytecode.AnnotationsAttribute getAnnotationsAttribute(javassist.bytecode.ClassFile ccFile)
public static javassist.bytecode.annotation.Annotation cloneAnnotation(javassist.bytecode.ConstPool constPool, Annotation annotation) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
constPool
- annotation
- IllegalArgumentException
IllegalAccessException
InvocationTargetException
public static void addResourceAnnotation(javassist.CtField field, String beanName)
public static void addMethodAnnotations(javassist.CtMethod ctMethod, Method method) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
public static List<Method> getMethodsAnnotatedWith(Class<?> type, Class<? extends Annotation> annotation)
public static javassist.bytecode.annotation.MemberValue createMemberValue(javassist.bytecode.ConstPool constPool, Object val)
public static void copyTypeAnnotations(Class<?> fromClass, javassist.CtClass toClass) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
Copyright © 2016. All rights reserved.