Interface AnnotationReference

All Superinterfaces:
Element

@Beta public interface AnnotationReference extends Element
Represents an annotation.
Author:
Sven Efftinge
  • Method Details

    • getAnnotationTypeDeclaration

      AnnotationTypeDeclaration getAnnotationTypeDeclaration()
      Returns:
      the annotation type
    • getValue

      Object getValue(String property)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned. Depending of the respective annotation type element, the following values are possibly returned:
      • Short or short[]
      • Integer or int[]
      • Long or long[]
      • Float or float[]
      • Double or double[]
      • Boolean or boolean[]
      • TypeReference or TypeReference[] - for elements of type Class<?>
      • AnnotationReference or AnnotationReference[] - for elements of an annotation type
      • EnumerationValueDeclaration or EnumerationValueDeclaration[] - for elements of an enum type
      • null if no value is set and no default value on the original annotation type element is declared.
      Parameters:
      property - the name of the property
      Returns:
      the value set on this annotation reference, the default value of the annotation type element or null.
    • getIntValue

      int getIntValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getIntArrayValue

      int[] getIntArrayValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getLongValue

      long getLongValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getLongArrayValue

      long[] getLongArrayValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getShortValue

      short getShortValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getShortArrayValue

      short[] getShortArrayValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getFloatValue

      float getFloatValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getFloatArrayValue

      float[] getFloatArrayValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getDoubleValue

      double getDoubleValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getDoubleArrayValue

      double[] getDoubleArrayValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getByteValue

      byte getByteValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getByteArrayValue

      byte[] getByteArrayValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getBooleanValue

      boolean getBooleanValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getBooleanArrayValue

      boolean[] getBooleanArrayValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getCharValue

      char getCharValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getCharArrayValue

      char[] getCharArrayValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getStringValue

      String getStringValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getStringArrayValue

      String[] getStringArrayValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getClassValue

      TypeReference getClassValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getClassArrayValue

      TypeReference[] getClassArrayValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getEnumValue

      EnumerationValueDeclaration getEnumValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getEnumArrayValue

      EnumerationValueDeclaration[] getEnumArrayValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getAnnotationValue

      AnnotationReference getAnnotationValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getAnnotationArrayValue

      AnnotationReference[] getAnnotationArrayValue(String name)
      Returns the value for the given property. If no value was specified on the reference the default value of the corresponding AnnotationTypeElementDeclaration will be returned.
      Parameters:
      name -
      Returns:
      the value set on this annotation reference or the default value of the annotation type element.
    • getExpression

      Expression getExpression(String name)
      Returns the expression for the given annotation property. Returns null if no expression is set, or this annotation reference is an external element (i.e. Tracability.isExternal(Element) returns true).
      Parameters:
      name -
      Returns:
      the expression