Module org.eclipse.xtend.lib.macro
Interface MutableAnnotationTypeElementDeclaration
- All Superinterfaces:
AnnotationTarget,AnnotationTypeElementDeclaration,Declaration,Element,MemberDeclaration,MutableAnnotationTarget,MutableDeclaration,MutableElement,MutableMemberDeclaration,MutableNamedElement,NamedElement
@Beta
public interface MutableAnnotationTypeElementDeclaration
extends MutableMemberDeclaration, AnnotationTypeElementDeclaration
Represents an annotation property.
- Author:
- Sven Efftinge
-
Method Summary
Modifier and TypeMethodDescriptionvoidsetDefaultValueExpression(CompilationStrategy compilationStrategy) Sets the givenCompilationStrategyas the default value.voidSetting an expression will alter the scope of it accordingly.voidsetDefaultValueExpression(org.eclipse.xtend2.lib.StringConcatenationClient compilationTemplate) Sets the givenStringConcatenationClientas the default value.voidsetType(TypeReference type) Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.AnnotationTarget
findAnnotation, getAnnotationsMethods inherited from interface org.eclipse.xtend.lib.macro.declaration.AnnotationTypeElementDeclaration
getDefaultValue, getDefaultValueExpression, getTypeMethods 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.MutableElement
removeMethods inherited from interface org.eclipse.xtend.lib.macro.declaration.MutableMemberDeclaration
getDeclaringType, setDeprecated, setDocComment, setVisibilityMethods inherited from interface org.eclipse.xtend.lib.macro.declaration.MutableNamedElement
setSimpleNameMethods inherited from interface org.eclipse.xtend.lib.macro.declaration.NamedElement
getCompilationUnit, getSimpleName
-
Method Details
-
setDefaultValueExpression
Setting an expression will alter the scope of it accordingly. Each expression can only be assigned to one element, if thisMutableExecutableDeclarationhas already set another expression or compilation strategy the old one will be detached. If the given expression is already assigned to anotherMutableExecutableDeclarationorMutableFieldDeclarationit will be automatically detached from it.- Parameters:
value- the expression to set as the default value of this annotation property- Since:
- 2.12
-
setDefaultValueExpression
Sets the givenCompilationStrategyas the default value. The givenCompilationStrategywill be executed later during code generation, not immediately. If thisMutableExecutableDeclarationhas already set another expression or compilation strategy the old one will be detached.- Parameters:
compilationStrategy- the compilation strategy, must not benull- Throws:
IllegalArgumentException- ifcompilationStrategyisnull- Since:
- 2.12
-
setDefaultValueExpression
void setDefaultValueExpression(org.eclipse.xtend2.lib.StringConcatenationClient compilationTemplate) Sets the givenStringConcatenationClientas the default value. The givenStringConcatenationClientwill be executed later during code generation, not immediately. If thisMutableExecutableDeclarationhas already set another expression or compilation strategy the old one will be detached.- Parameters:
compilationTemplate- the compilation strategy, must not benull- Throws:
IllegalArgumentException- ifcompilationStrategyisnull- Since:
- 2.12
-
setType
- Parameters:
type- the type of this annotation property, must be notnull- Throws:
IllegalArgumentException- if thetypeisnull- Since:
- 2.12
-