public class AnnotationGenerator
extends java.lang.Object
| Constructor and Description |
|---|
AnnotationGenerator(Global g) |
| Modifier and Type | Method and Description |
|---|---|
void |
annotate(Host h,
java.lang.Class<? extends java.lang.annotation.Annotation> klass,
AnnotationElem... elems)
Applies a Java 1.5-style annotation to a given Host.
|
void |
annotate(Host h,
java.lang.Class<? extends java.lang.annotation.Annotation> klass,
java.util.List<AnnotationElem> elems)
Applies a Java 1.5-style annotation to a given Host.
|
void |
annotate(Host h,
java.lang.String annotationName,
int visibility,
java.util.List<AnnotationElem> elems)
Applies a Java 1.5-style annotation to a given Host.
|
static AnnotationGenerator |
v()
Returns the unique instance of AnnotationGenerator.
|
public static AnnotationGenerator v()
public void annotate(Host h, java.lang.Class<? extends java.lang.annotation.Annotation> klass, AnnotationElem... elems)
SootClass, SootMethod
or SootField.h - a method, field, or classklass - the class of the annotation to apply to helems - a (possibly empty) sequence of AnnotationElem objects corresponding to the elements that should be contained in this annotationpublic void annotate(Host h, java.lang.Class<? extends java.lang.annotation.Annotation> klass, java.util.List<AnnotationElem> elems)
SootClass, SootMethod
or SootField.h - a method, field, or classklass - the class of the annotation to apply to helems - a (possibly empty) sequence of AnnotationElem objects corresponding to the elements that should be contained in this annotationpublic void annotate(Host h, java.lang.String annotationName, int visibility, java.util.List<AnnotationElem> elems)
SootClass, SootMethod
or SootField.h - a method, field, or classannotationName - the qualified name of the annotation classvisibility - any of the constants in AnnotationConstantselems - a (possibly empty) sequence of AnnotationElem objects corresponding to the elements that should be contained in this annotation