java.lang.annotation.Repeatable annotation even if compiled prior to
Java 8 which introduces this annotation. As the annotation is not present on previous JVM versions, it is ignored
at runtime for older JVM versions what makes this approach feasible.
| Modifier and Type | Class and Description |
|---|---|
| public static @interface | RepeatedAnnotationPlugin.Enhance
Indicates that the annotated annotation should be repeatable by the supplied annotation. |
| protected static class | RepeatedAnnotationPlugin.RepeatedAnnotationAppender
A type attribute appender that adds a repeated annotation for a target type. |
| Modifier and Type | Field and Description |
|---|---|
| private static final MethodDescription. | VALUE
A description of the |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public DynamicType. | apply(DynamicType.
The builder to use as a basis for the applied transformation. builder,The type being transformed. typeDescription, ClassFileLocator A class file locator that can locate other types in the scope of the project. classFileLocator)Implements net. |
| public void | close()
Implements java. |
| VALUE | back to summary |
|---|---|
| private static final MethodDescription. A description of the | |
| RepeatedAnnotationPlugin | back to summary |
|---|---|
| public RepeatedAnnotationPlugin() Creates a new plugin for creating repeated annotations. | |
| apply | back to summary |
|---|---|
| public DynamicType. Implements net. Doc from net. Applies this plugin.
| |
| close | back to summary |
|---|---|
| public void close() Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in | |
| Modifier and Type | Method and Description |
|---|---|
| public Class |
| value | back to summary |
|---|---|
| public Class The repeating annotation type.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final TypeDescription | target
The repeated type. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | apply(ClassVisitor
The class visitor to which the annotations of this visitor should be written to. classVisitor, TypeDescription A description of the instrumented type that is target of the ongoing instrumentation. instrumentedType, AnnotationValueFilter The annotation value filter to apply when writing annotations. annotationValueFilter)Implements net. |
| target | back to summary |
|---|---|
| private final TypeDescription target The repeated type. | |
| RepeatedAnnotationAppender | back to summary |
|---|---|
| protected RepeatedAnnotationAppender(TypeDescription target) Creates a new appender.
| |
| apply | back to summary |
|---|---|
| public void apply(ClassVisitor classVisitor, TypeDescription instrumentedType, AnnotationValueFilter annotationValueFilter) Implements net. Doc from net. Applies this type attribute appender.
| |