01: package com.sun.codemodel;
02:
03: import java.lang.annotation.Annotation;
04:
05: /**
06: * Annotatable program elements.
07: *
08: * @author Kohsuke Kawaguchi
09: */
10: public interface JAnnotatable {
11: /**
12: * Adds an annotation to this program element.
13: * @param clazz
14: * The annotation class to annotate the program element with
15: */
16: JAnnotationUse annotate(JClass clazz);
17:
18: /**
19: * Adds an annotation to this program element.
20: *
21: * @param clazz
22: * The annotation class to annotate the program element with
23: */
24: JAnnotationUse annotate(Class<? extends Annotation> clazz);
25:
26: /**
27: * Adds an annotation to this program element
28: * and returns a type-safe writer to fill in the values of such annotations.
29: */
30: <W extends JAnnotationWriter> W annotate2(Class<W> clazz);
31: }
|