Class AnnotationReference

    • Field Detail

      • classId

        public static int classId
    • Constructor Detail

      • AnnotationReference

        public AnnotationReference​(AnnotationReferenceDataType type,
                                   Annotation reference)
        Constructs a new AnnotationReference, with a reference to the given Annotation.
        Parameters:
        type - the data type of this AnnotationReference
        reference - the reference to set
        Throws:
        java.lang.IllegalArgumentException - if the given annotation has a type that is not compatible with this reference
      • AnnotationReference

        public AnnotationReference​(AnnotationReferenceDataType type)
        Constructs a new AnnotationReference.
        Parameters:
        type - the data type of this AnnotationReference
    • Method Detail

      • clone

        public AnnotationReference clone()
        Clones this AnnotationReference. Note: No deep-copying, so the AnnotationReference returned refers to the same Annotation as this AnnotationReference.
        Overrides:
        clone in class FieldValue
        Returns:
        a copy of this object, referring to the same Annotation instance.
      • getReference

        public Annotation getReference()
        Returns the Annotation that this AnnotationReference refers to.
        Returns:
        the Annotation that this AnnotationReference refers to.
      • assign

        public void assign​(java.lang.Object o)
        Description copied from class: FieldValue
        Assign this non-fieldvalue value to this field value. This is used to be able to assign ints to Integer field values and List to Array field values and such.

        Override to accept the specific types that should be legal.

        Specified by:
        assign in class FieldValue
      • setReference

        public void setReference​(Annotation reference)
        Set an Annotation that this AnnotationReference shall refer to.
        Parameters:
        reference - an Annotation that this AnnotationReference shall refer to.
        Throws:
        java.lang.IllegalArgumentException - if the given annotation has a type that is not compatible with this reference
      • setReferenceNoCompatibilityCheck

        public void setReferenceNoCompatibilityCheck​(Annotation reference)
        WARNING! Only to be used by deserializers when reference is not fully deserialized yet! Sets an Annotation that this AnnotationReference shall refer to.
        Parameters:
        reference - an Annotation that this AnnotationReference shall refer to.
        Throws:
        java.lang.IllegalArgumentException - if the given annotation has a type that is not compatible with this reference
      • setDataType

        public void setDataType​(DataType dataType)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class com.yahoo.vespa.objects.Identifiable
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class com.yahoo.vespa.objects.Identifiable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class com.yahoo.vespa.objects.Identifiable