public class AnnotationEnhancer
extends java.lang.Object
java.lang.reader.RetentionPolicy.RUNTIME
annotations.Constructor and Description |
---|
AnnotationEnhancer(MessageHandler messageHandler)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getClassFileName() |
java.lang.ClassLoader |
getClassLoader() |
java.lang.String |
getClassName() |
static java.lang.String |
getDescForQDoxType(com.thoughtworks.qdox.model.Type type)
Returns the VM desc for a QDox Type.
|
static java.lang.String |
getFieldDesc(JavaField field)
Returns the VM desc for a QDox field.
|
static java.lang.String |
getMethodDesc(JavaMethod method)
Returns the VM desc for a QDox method.
|
boolean |
initialize(java.lang.String className,
java.lang.ClassLoader loader)
Initializes the enhancer.
|
boolean |
initialize(java.lang.String className,
java.net.URL[] classPath)
Initializes the enhancer.
|
void |
insertClassAnnotation(RawAnnotation annotation)
Inserts an annotation on class level.
|
void |
insertConstructorAnnotation(JavaMethod constructor,
RawAnnotation annotation)
Inserts an annotation on constructor level.
|
void |
insertFieldAnnotation(JavaField field,
RawAnnotation annotation)
Inserts an annotation on field level.
|
void |
insertMethodAnnotation(JavaMethod method,
RawAnnotation annotation)
Inserts an annotation on method level.
|
void |
write(java.lang.String destDir)
Writes the enhanced class to file.
|
public AnnotationEnhancer(MessageHandler messageHandler)
messageHandler
- public boolean initialize(java.lang.String className, java.net.URL[] classPath)
className
- the class nameclassPath
- the class pathpublic boolean initialize(java.lang.String className, java.lang.ClassLoader loader)
className
- the class nameloader
- public void insertClassAnnotation(RawAnnotation annotation)
annotation
- the annotationpublic void insertFieldAnnotation(JavaField field, RawAnnotation annotation)
field
- the QDox java fieldannotation
- the annotationpublic void insertMethodAnnotation(JavaMethod method, RawAnnotation annotation)
method
- the QDox java methodannotation
- the annotationpublic void insertConstructorAnnotation(JavaMethod constructor, RawAnnotation annotation)
constructor
- the QDox java methodannotation
- the annotationpublic void write(java.lang.String destDir)
destDir
- the destination directorypublic static java.lang.String getFieldDesc(JavaField field)
field
- the QDox fieldpublic static java.lang.String getMethodDesc(JavaMethod method)
method
- the QDox methodpublic static java.lang.String getDescForQDoxType(com.thoughtworks.qdox.model.Type type)
type
- the qdox typepublic java.lang.String getClassName()
public java.lang.String getClassFileName()
public java.lang.ClassLoader getClassLoader()