Interface IJavaAnnotation

All Superinterfaces:
IJavaElement, IJavaExpression

@Ser public interface IJavaAnnotation extends IJavaExpression
Java AST interface to represent a Java annotation.

Example:

 @SomeAnnotation(...)
 
  • Method Details

    • getType

      IJavaType getType()
      Get the annotation type.
      Returns:
    • setType

      void setType(IJavaType type)
      Set or update the annotation type.
      Parameters:
      type -
    • getElements

      Get the elements of this annotation. The actual list is returned and may be modified.
      Returns:
    • generate

      void generate(JavaOutputSink out, char charAfterAnno)
      Custom generator.
      Parameters:
      out - output sink
      charAfterAnno - a character to be appended after the annotation; 0 if none
    • duplicate

      IJavaAnnotation duplicate()
      Description copied from interface: IJavaElement
      Duplicate this element.
      Specified by:
      duplicate in interface IJavaElement
      Specified by:
      duplicate in interface IJavaExpression
      Returns:
      a (possibly) duplicated object of the same type