Class TypeAnnotation

    • Constructor Detail

      • TypeAnnotation

        public TypeAnnotation​(java.lang.String typeDescriptor)
        constructor.

        For information on type descriptors,
        see http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc. html#14152
        or http://www.murrayc.com/learning/java/java_classfileformat.shtml# TypeDescriptors

        Parameters:
        typeDescriptor - a jvm type descriptor, such as "[I"
      • TypeAnnotation

        public TypeAnnotation​(org.apache.bcel.generic.Type objectType)
      • TypeAnnotation

        public TypeAnnotation​(org.apache.bcel.generic.Type objectType,
                              java.lang.String roleDescription)
      • TypeAnnotation

        public TypeAnnotation​(java.lang.String typeDescriptor,
                              java.lang.String roleDescription)
    • Method Detail

      • getTypeDescriptor

        public java.lang.String getTypeDescriptor()
        Get the type descriptor.
        Returns:
        the jvm type descriptor, such as "[I"
      • accept

        public void accept​(BugAnnotationVisitor visitor)
        Description copied from interface: BugAnnotation
        Accept a BugAnnotationVisitor.
        Parameters:
        visitor - the visitor to accept
      • format

        public java.lang.String format​(java.lang.String key,
                                       ClassAnnotation primaryClass)
        Description copied from interface: BugAnnotation
        Format the annotation as a String. The given key specifies additional information about how the annotation should be formatted. If the key is empty, then the "default" format will be used.
        Parameters:
        key - how the annotation should be formatted
        primaryClass - The primary class for the bug; some bug annotation format msgs are simplified in relation to that class.
      • setDescription

        public void setDescription​(java.lang.String roleDescription)
        Description copied from interface: BugAnnotation
        Set a description of this bug annotation. The description is a key for the FindBugsAnnotationDescriptions resource bundle.
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: BugAnnotation
        Get a description of this bug annotation. The description is a key for the FindBugsAnnotationDescriptions resource bundle.
      • setTypeParameters

        public void setTypeParameters​(java.lang.String typeParameters)
      • getTypeParameters

        public java.lang.String getTypeParameters()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • writeXML

        public void writeXML​(XMLOutput xmlOutput)
                      throws java.io.IOException
        Description copied from interface: XMLWriteable
        Write this object to given XMLOutput.
        Parameters:
        xmlOutput - the XMLOutput for the document
        Throws:
        java.io.IOException
      • writeXML

        public void writeXML​(XMLOutput xmlOutput,
                             boolean addMessages,
                             boolean isPrimary)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • isSignificant

        public boolean isSignificant()
        Description copied from interface: BugAnnotation
        Is this annotation used to compute instance hashes or match bug instances across versions
        Returns:
        true if significant