Interface JAnnotation

All Known Implementing Classes:
ImplJAnnotation

public interface JAnnotation
An annotation.
  • Method Details

    • value

      JAnnotation value(JExpr expr)
      Set the "value" property of this annotation. To set an array of values, see JExprs.array(JExpr...).
      Parameters:
      expr - the annotation value
      Returns:
      this annotation
    • value

      JAnnotation value(String literal)
      Set the "value" property of this annotation to a string.
      Parameters:
      literal - the annotation value string
      Returns:
      this annotation
    • annotationValue

      JAnnotation annotationValue(String type)
      Set the "value" property of this annotation to a nested annotation of the given type.
      Parameters:
      type - the annotation type
      Returns:
      the nested annotation
    • annotationValue

      JAnnotation annotationValue(JType type)
      Set the "value" property of this annotation to a nested annotation of the given type.
      Parameters:
      type - the annotation type
      Returns:
      the nested annotation
    • annotationValue

      JAnnotation annotationValue(Class<? extends Annotation> type)
      Set the "value" property of this annotation to a nested annotation of the given type.
      Parameters:
      type - the annotation type
      Returns:
      the nested annotation
    • annotationArrayValue

      JAnnotationArray annotationArrayValue(String type)
      Set the "value" property of this annotation to an array of nested annotations of the given type.
      Parameters:
      type - the annotation array element type
      Returns:
      the nested annotation
    • annotationArrayValue

      JAnnotationArray annotationArrayValue(JType type)
      Set the "value" property of this annotation to an array of nested annotations of the given type.
      Parameters:
      type - the annotation array element type
      Returns:
      the nested annotation
    • annotationArrayValue

      JAnnotationArray annotationArrayValue(Class<? extends Annotation> type)
      Set the "value" property of this annotation to an array of nested annotations of the given type.
      Parameters:
      type - the annotation array element type
      Returns:
      the nested annotation
    • value

      JAnnotation value(String name, JExpr expr)
      Set the named property of this annotation. To set an array of values, see JExprs.array(JExpr...).
      Parameters:
      name - the annotation property name
      expr - the annotation value
      Returns:
      this annotation
    • value

      JAnnotation value(String name, String literal)
      Set the named property of this annotation to a string.
      Parameters:
      name - the annotation property name
      literal - the annotation value string
      Returns:
      this annotation
    • annotationValue

      JAnnotation annotationValue(String name, String type)
      Set the named property of this annotation to a nested annotation of the given type.
      Parameters:
      type - the annotation type
      Returns:
      the nested annotation
    • annotationValue

      JAnnotation annotationValue(String name, JType type)
      Set the named property of this annotation to a nested annotation of the given type.
      Parameters:
      type - the annotation type
      Returns:
      the nested annotation
    • annotationValue

      JAnnotation annotationValue(String name, Class<? extends Annotation> type)
      Set the named property of this annotation to a nested annotation of the given type.
      Parameters:
      type - the annotation type
      Returns:
      the nested annotation
    • annotationArrayValue

      JAnnotationArray annotationArrayValue(String name, String type)
      Set the named property of this annotation to an array of nested annotations of the given type.
      Parameters:
      type - the annotation array element type
      Returns:
      the nested annotation
    • annotationArrayValue

      JAnnotationArray annotationArrayValue(String name, JType type)
      Set the named property of this annotation to an array of nested annotations of the given type.
      Parameters:
      type - the annotation array element type
      Returns:
      the nested annotation
    • annotationArrayValue

      JAnnotationArray annotationArrayValue(String name, Class<? extends Annotation> type)
      Set the named property of this annotation to an array of nested annotations of the given type.
      Parameters:
      type - the annotation array element type
      Returns:
      the nested annotation