Interface AnnotationReferenceBuildContext


@Beta public interface AnnotationReferenceBuildContext
Services provided during an annotation reference initialization.
Since:
2.6
Author:
Anton Kosyakov
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    set(String name, Object value)
    Sets the annotation property of the given name Depending of the respective annotation type element, the following values are permitted: 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 Expression - for any element type that matches the given expression's type null - will remove any existing value for the given element name
    void
    Sets the given value for the given annotation element name.
    void
    setBooleanValue(String name, boolean... value)
    Sets the given value for the given annotation element name.
    void
    setByteValue(String name, byte... value)
    Sets the given value for the given annotation element name.
    void
    setCharValue(String name, char... value)
    Sets the given value for the given annotation element name.
    void
    Sets the given value for the given annotation element name.
    void
    setDoubleValue(String name, double... value)
    Sets the given value for the given annotation element name.
    void
    Sets the given value for the given annotation element name.
    void
    setFloatValue(String name, float... value)
    Sets the given value for the given annotation element name.
    void
    setIntValue(String name, int... value)
    Sets the given value for the given annotation element name.
    void
    setLongValue(String name, long... value)
    Sets the given value for the given annotation element name.
    void
    setShortValue(String name, short... value)
    Sets the given value for the given annotation element name.
    void
    setStringValue(String name, String... value)
    Sets the given value for the given annotation element name.
  • Method Details

    • set

      void set(String name, Object value)
      Sets the annotation property of the given name Depending of the respective annotation type element, the following values are permitted:
      • 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
      • Expression - for any element type that matches the given expression's type
      • null - will remove any existing value for the given element name
      Parameters:
      name - a valid name of a property of the annotation type.
      value - an annotation value or null if the annotation value should be removed.
      Throws:
      IllegalArgumentException - if the value is not valid. See explanation above or if the name does not identify a method in the referenced annotation type.
    • setIntValue

      void setIntValue(String name, int... value)
      Sets the given value for the given annotation element name.
      Parameters:
      name - a valid name of a property of the annotation type.
      value - a non-null value array
      Throws:
      IllegalArgumentException - if the name does not point to a valid member of the referenced annotation type.
    • setLongValue

      void setLongValue(String name, long... value)
      Sets the given value for the given annotation element name.
      Parameters:
      name - a valid name of a property of the annotation type.
      value - a non-null value array
      Throws:
      IllegalArgumentException - if the name does not point to a valid member of the referenced annotation type.
    • setShortValue

      void setShortValue(String name, short... value)
      Sets the given value for the given annotation element name.
      Parameters:
      name - a valid name of a property of the annotation type.
      value - a non-null value array
      Throws:
      IllegalArgumentException - if the name does not point to a valid member of the referenced annotation type.
    • setDoubleValue

      void setDoubleValue(String name, double... value)
      Sets the given value for the given annotation element name.
      Parameters:
      name - a valid name of a property of the annotation type.
      value - a non-null value array
      Throws:
      IllegalArgumentException - if the name does not point to a valid member of the referenced annotation type.
    • setFloatValue

      void setFloatValue(String name, float... value)
      Sets the given value for the given annotation element name.
      Parameters:
      name - a valid name of a property of the annotation type.
      value - a non-null value array
      Throws:
      IllegalArgumentException - if the name does not point to a valid member of the referenced annotation type.
    • setByteValue

      void setByteValue(String name, byte... value)
      Sets the given value for the given annotation element name.
      Parameters:
      name - a valid name of a property of the annotation type.
      value - a non-null value array
      Throws:
      IllegalArgumentException - if the name does not point to a valid member of the referenced annotation type.
    • setBooleanValue

      void setBooleanValue(String name, boolean... value)
      Sets the given value for the given annotation element name.
      Parameters:
      name - a valid name of a property of the annotation type.
      value - a non-null value array
      Throws:
      IllegalArgumentException - if the name does not point to a valid member of the referenced annotation type.
    • setCharValue

      void setCharValue(String name, char... value)
      Sets the given value for the given annotation element name.
      Parameters:
      name - a valid name of a property of the annotation type.
      value - a non-null value array
      Throws:
      IllegalArgumentException - if the name does not point to a valid member of the referenced annotation type.
    • setStringValue

      void setStringValue(String name, String... value)
      Sets the given value for the given annotation element name.
      Parameters:
      name - a valid name of a property of the annotation type.
      value - a non-null value array without any null entries
      Throws:
      IllegalArgumentException - if the name does not point to a valid member of the referenced annotation type.
    • setClassValue

      void setClassValue(String name, TypeReference... value)
      Sets the given value for the given annotation element name.
      Parameters:
      name - a valid name of a property of the annotation type.
      value - a non-null value array without any null entries
      Throws:
      IllegalArgumentException - if the name does not point to a valid member of the referenced annotation type.
    • setEnumValue

      void setEnumValue(String name, EnumerationValueDeclaration... value)
      Sets the given value for the given annotation element name.
      Parameters:
      name - a valid name of a property of the annotation type.
      value - a non-null value array without any null entries
      Throws:
      IllegalArgumentException - if the name does not point to a valid member of the referenced annotation type.
    • setAnnotationValue

      void setAnnotationValue(String name, AnnotationReference... value)
      Sets the given value for the given annotation element name.
      Parameters:
      name - a valid name of a property of the annotation type.
      value - a non-null value array without any null entries
      Throws:
      IllegalArgumentException - if the name does not point to a valid member of the referenced annotation type.