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 Details

    • 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 this MutableExecutableDeclaration has already set another expression or compilation strategy the old one will be detached. If the given expression is already assigned to another MutableExecutableDeclaration or MutableFieldDeclaration it 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 given CompilationStrategy as the default value. The given CompilationStrategy will be executed later during code generation, not immediately. If this MutableExecutableDeclaration has already set another expression or compilation strategy the old one will be detached.
      Parameters:
      compilationStrategy - the compilation strategy, must not be null
      Throws:
      IllegalArgumentException - if compilationStrategy is null
      Since:
      2.12
    • setDefaultValueExpression

      void setDefaultValueExpression(org.eclipse.xtend2.lib.StringConcatenationClient compilationTemplate)
      Sets the given StringConcatenationClient as the default value. The given StringConcatenationClient will be executed later during code generation, not immediately. If this MutableExecutableDeclaration has already set another expression or compilation strategy the old one will be detached.
      Parameters:
      compilationTemplate - the compilation strategy, must not be null
      Throws:
      IllegalArgumentException - if compilationStrategy is null
      Since:
      2.12
    • setType

      void setType(TypeReference type)
      Parameters:
      type - the type of this annotation property, must be not null
      Throws:
      IllegalArgumentException - if the type is null
      Since:
      2.12