Class SimpleTypeAnnotationValue

  • All Implemented Interfaces:
    javax.lang.model.element.AnnotationValue

    public final class SimpleTypeAnnotationValue
    extends java.lang.Object
    implements javax.lang.model.element.AnnotationValue
    A simple implementation of the AnnotationValue interface for a class literal, e.g. an annotation member of type Class<?> or Class<? extends Foo>.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javax.lang.model.type.TypeMirror value  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private SimpleTypeAnnotationValue​(javax.lang.model.type.TypeMirror value)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <R,​P>
      R
      accept​(javax.lang.model.element.AnnotationValueVisitor<R,​P> visitor, P parameter)  
      javax.lang.model.type.TypeMirror getValue()  
      static javax.lang.model.element.AnnotationValue of​(javax.lang.model.type.TypeMirror value)
      An object representing an annotation value instance.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • value

        private final javax.lang.model.type.TypeMirror value
    • Constructor Detail

      • SimpleTypeAnnotationValue

        private SimpleTypeAnnotationValue​(javax.lang.model.type.TypeMirror value)
    • Method Detail

      • of

        public static javax.lang.model.element.AnnotationValue of​(javax.lang.model.type.TypeMirror value)
        An object representing an annotation value instance.
        Parameters:
        value - a primitive, array, or non-parameterized declared type
      • getValue

        public javax.lang.model.type.TypeMirror getValue()
        Specified by:
        getValue in interface javax.lang.model.element.AnnotationValue
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface javax.lang.model.element.AnnotationValue
        Overrides:
        toString in class java.lang.Object
      • accept

        public <R,​P> R accept​(javax.lang.model.element.AnnotationValueVisitor<R,​P> visitor,
                                    P parameter)
        Specified by:
        accept in interface javax.lang.model.element.AnnotationValue