@Beta public interface MutableAnnotationTypeDeclaration extends MutableTypeDeclaration, AnnotationTypeDeclaration
Modifier and Type | Method and Description |
---|---|
MutableAnnotationTypeElementDeclaration |
addAnnotationTypeElement(java.lang.String name,
Procedures.Procedure1<MutableAnnotationTypeElementDeclaration> initializer)
Adds a new annotation type element with the given name.
|
MutableAnnotationTypeElementDeclaration |
findDeclaredAnnotationTypeElement(java.lang.String name) |
java.lang.Iterable<? extends MutableAnnotationTypeElementDeclaration> |
getDeclaredAnnotationTypeElements() |
addConstructor, addField, addMethod, findDeclaredConstructor, findDeclaredField, findDeclaredMethod, findDeclaredType, getDeclaredAnnotationTypes, getDeclaredClasses, getDeclaredConstructors, getDeclaredEnumerationTypes, getDeclaredFields, getDeclaredInterfaces, getDeclaredMembers, getDeclaredMethods, getDeclaredTypes, remove, setSimpleName
getDeclaringType, setDeprecated, setDocComment, setVisibility
markAsRead
addAnnotation, removeAnnotation
getQualifiedName, isAssignableFrom
getDocComment, getModifiers, getVisibility, isDeprecated
findAnnotation, getAnnotations
MutableAnnotationTypeElementDeclaration findDeclaredAnnotationTypeElement(java.lang.String name)
findDeclaredAnnotationTypeElement
in interface AnnotationTypeDeclaration
name
- the name of the annotation elementnull
if no such annotation type element existsjava.lang.Iterable<? extends MutableAnnotationTypeElementDeclaration> getDeclaredAnnotationTypeElements()
getDeclaredAnnotationTypeElements
in interface AnnotationTypeDeclaration
MutableAnnotationTypeElementDeclaration addAnnotationTypeElement(java.lang.String name, Procedures.Procedure1<MutableAnnotationTypeElementDeclaration> initializer)
name
- the name of the annotation type element to be added, must not be null
initializer
- a callback for further initialization of the created annotation type element, must not be null
java.lang.UnsupportedOperationException
- if the underlying type declaration is not capable of containing an annotation type element.java.lang.IllegalArgumentException
- if the name
is not a valid java identifier or the initializer
is null