Class AnnotationCreatorImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String annotationType  
      private java.lang.annotation.RetentionPolicy retentionPolicy  
      private java.util.Map<java.lang.String,​java.lang.Object> values  
    • Constructor Summary

      Constructors 
      Constructor Description
      AnnotationCreatorImpl​(java.lang.String annotationType, java.lang.annotation.RetentionPolicy retentionPolicy)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addValue​(java.lang.String name, java.lang.Object value)
      Add a new annotation element with the given name and value.
      java.lang.String getAnnotationType()  
      java.lang.annotation.RetentionPolicy getRetentionPolicy()  
      java.util.Map<java.lang.String,​java.lang.Object> getValues()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • values

        private java.util.Map<java.lang.String,​java.lang.Object> values
      • annotationType

        private final java.lang.String annotationType
      • retentionPolicy

        private final java.lang.annotation.RetentionPolicy retentionPolicy
    • Constructor Detail

      • AnnotationCreatorImpl

        AnnotationCreatorImpl​(java.lang.String annotationType,
                              java.lang.annotation.RetentionPolicy retentionPolicy)
    • Method Detail

      • addValue

        public void addValue​(java.lang.String name,
                             java.lang.Object value)
        Description copied from interface: AnnotationCreator
        Add a new annotation element with the given name and value. The name may be any permissible annotation element name (for example, toString or annotationType are invalid). The value may be:
        • primitive wrapper type
        • String
        • Enum
        • Class
        • nested annotation as an AnnotationCreator created using AnnotationCreator.of(), or as a Jandex AnnotationInstance
        • array of previously mentioned types
        In addition to the types listed above, the value may also be a Jandex AnnotationValue.
        Specified by:
        addValue in interface AnnotationCreator
        Parameters:
        name - name of the annotation element to add
        value - value of the annotation element to add
      • getValues

        public java.util.Map<java.lang.String,​java.lang.Object> getValues()
      • getAnnotationType

        public java.lang.String getAnnotationType()
      • getRetentionPolicy

        public java.lang.annotation.RetentionPolicy getRetentionPolicy()