Class Annotations

java.lang.Object
de.inetsoftware.classparser.Annotations

public class Annotations extends Object
  • Constructor Details

    • Annotations

      public Annotations()
  • Method Details

    • read

      static Map<String,Map<String,Object>> read(DataInputStream input, ConstantPool constantPool) throws 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:
      IOException - if an I/O error occurs
    • readElementValue

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