Module org.eclipse.xtend.lib.macro
Interface MutableAnnotationTypeDeclaration
- All Superinterfaces:
AnnotationTarget,AnnotationTypeDeclaration,Declaration,Element,MemberDeclaration,MutableAnnotationTarget,MutableDeclaration,MutableElement,MutableMemberDeclaration,MutableNamedElement,MutableTypeDeclaration,NamedElement,Type,TypeDeclaration
@Beta
public interface MutableAnnotationTypeDeclaration
extends MutableTypeDeclaration, AnnotationTypeDeclaration
- Author:
- Sven Efftinge
-
Method Summary
Modifier and TypeMethodDescriptionaddAnnotationTypeElement(String name, org.eclipse.xtext.xbase.lib.Procedures.Procedure1<MutableAnnotationTypeElementDeclaration> initializer) Adds a new annotation type element with the given name.Iterable<? extends MutableAnnotationTypeElementDeclaration> Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.AnnotationTarget
findAnnotation, getAnnotationsMethods inherited from interface org.eclipse.xtend.lib.macro.declaration.MemberDeclaration
getDocComment, getModifiers, getVisibility, isDeprecatedMethods inherited from interface org.eclipse.xtend.lib.macro.declaration.MutableAnnotationTarget
addAnnotation, removeAnnotationMethods inherited from interface org.eclipse.xtend.lib.macro.declaration.MutableDeclaration
markAsReadMethods inherited from interface org.eclipse.xtend.lib.macro.declaration.MutableMemberDeclaration
getDeclaringType, setDeprecated, setDocComment, setVisibilityMethods inherited from interface org.eclipse.xtend.lib.macro.declaration.MutableTypeDeclaration
addConstructor, addField, addMethod, findDeclaredConstructor, findDeclaredField, findDeclaredMethod, findDeclaredType, getDeclaredAnnotationTypes, getDeclaredClasses, getDeclaredConstructors, getDeclaredEnumerationTypes, getDeclaredFields, getDeclaredInterfaces, getDeclaredMembers, getDeclaredMethods, getDeclaredTypes, remove, setSimpleNameMethods inherited from interface org.eclipse.xtend.lib.macro.declaration.NamedElement
getCompilationUnit, getSimpleNameMethods inherited from interface org.eclipse.xtend.lib.macro.declaration.Type
getQualifiedName, isAssignableFrom
-
Method Details
-
findDeclaredAnnotationTypeElement
- Specified by:
findDeclaredAnnotationTypeElementin interfaceAnnotationTypeDeclaration- Parameters:
name- the name of the annotation element- Returns:
- the annotation type element with the given name, declared by this annotation type declaration or
nullif no such annotation type element exists
-
getDeclaredAnnotationTypeElements
Iterable<? extends MutableAnnotationTypeElementDeclaration> getDeclaredAnnotationTypeElements()- Specified by:
getDeclaredAnnotationTypeElementsin interfaceAnnotationTypeDeclaration- Returns:
- the annotation type elements declared by this annotation type declaration
-
addAnnotationTypeElement
MutableAnnotationTypeElementDeclaration addAnnotationTypeElement(String name, org.eclipse.xtext.xbase.lib.Procedures.Procedure1<MutableAnnotationTypeElementDeclaration> initializer) Adds a new annotation type element with the given name.- Parameters:
name- the name of the annotation type element to be added, must not benullinitializer- a callback for further initialization of the created annotation type element, must not benull- Returns:
- the created annotation type element declaration
- Throws:
UnsupportedOperationException- if the underlying type declaration is not capable of containing an annotation type element.IllegalArgumentException- if thenameis not a valid java identifier or theinitializerisnull
-