Interface AnnotationMaker
public interface AnnotationMaker
Defines the contents of an annotation.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionnewAnnotation
(Object annotationType) Define a new annotation, which can be put into this annotation at most once.void
-
Method Details
-
put
Put a name-value pair into the annotation, where the value can be a primitive type, aString
, anEnum
, aClass
, anAnnotationMaker
, or an array.- Parameters:
name
- annotation element namevalue
- annotation element value- Throws:
IllegalArgumentException
- if value is unsupportedIllegalStateException
- if name is already in this annotationIllegalStateException
- if value is an incorrectly usedAnnotationMaker
-
newAnnotation
Define a new annotation, which can be put into this annotation at most once.- Parameters:
annotationType
- name or class which refers to an annotation interface- Throws:
IllegalArgumentException
- if the annotation type is unsupported
-