Class Annotations


  • public class Annotations
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Annotations()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.Object>> read​(java.io.DataInputStream input, ConstantPool constantPool)
      Read the annotations structure.
      private static java.lang.Object readElementValue​(java.io.DataInputStream input, ConstantPool constantPool)
      Read a single element value
      • Methods inherited from class java.lang.Object

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

      • Annotations

        public Annotations()
    • Method Detail

      • read

        static java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.Object>> read​(java.io.DataInputStream input,
                                                                                                                 ConstantPool constantPool)
                                                                                                          throws java.io.IOException
        Read the annotations structure. http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7.17
        Parameters:
        input - the stream of the RuntimeInvisibleAnnotations attribute
        constantPool - the ConstantPool of the class
        Returns:
        the map of the annotation names to its attributes
        Throws:
        java.io.IOException - if an I/O error occurs
      • readElementValue

        private static java.lang.Object readElementValue​(java.io.DataInputStream input,
                                                         ConstantPool constantPool)
                                                  throws java.io.IOException
        Read a single element value
        Parameters:
        input - the stream of the RuntimeInvisibleAnnotations attribute
        constantPool - the ConstantPool of the class
        Returns:
        the value
        Throws:
        java.io.IOException - if an I/O error occurs