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.- Noimplement:
- This interface is not intended to be implemented by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidsetDefaultValueExpression(CompilationStrategy compilationStrategy)Sets the givenCompilationStrategyas the default value.voidsetDefaultValueExpression(Expression value)Setting 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, getAnnotations
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.AnnotationTypeElementDeclaration
getDefaultValue, getDefaultValueExpression, getType
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.MemberDeclaration
getDocComment, getModifiers, getVisibility, isDeprecated
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.MutableAnnotationTarget
addAnnotation, removeAnnotation
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.MutableDeclaration
markAsRead
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.MutableElement
remove
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.MutableMemberDeclaration
getDeclaringType, setDeprecated, setDocComment, setVisibility
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.MutableNamedElement
setSimpleName
-
Methods inherited from interface org.eclipse.xtend.lib.macro.declaration.NamedElement
getCompilationUnit, getSimpleName
-
-
-
-
Method Detail
-
setDefaultValueExpression
void setDefaultValueExpression(Expression value)
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
void setDefaultValueExpression(CompilationStrategy compilationStrategy)
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:
java.lang.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:
java.lang.IllegalArgumentException- ifcompilationStrategyisnull- Since:
- 2.12
-
setType
void setType(TypeReference type)
- Parameters:
type- the type of this annotation property, must be notnull- Throws:
java.lang.IllegalArgumentException- if thetypeisnull- Since:
- 2.12
-
-