Interface AnnotationReference

  • All Superinterfaces:
    Element

    @Beta
    public interface AnnotationReference
    extends Element
    Represents an annotation.
    Noimplement:
    This interface is not intended to be implemented by clients.
    • Method Detail

      • getValue

        java.lang.Object getValue​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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

        java.lang.String getStringValue​(java.lang.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

        java.lang.String[] getStringArrayValue​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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