Class AttributeReader

    • Field Detail

      • attr

        protected final int attr
      • length

        protected final int length
    • Method Detail

      • getClassReader

        public final ClassReader getClassReader()
        Returns:
        the class reader the attribute belongs to
      • getRawOffset

        public final int getRawOffset()
        Returns:
        the offset of the raw attribute data (including the attribute header)
      • getRawSize

        public final int getRawSize()
        Returns:
        the size of the raw attribute data (including the attribute header)
      • checkSize

        protected final void checkSize​(int offset,
                                       int len)
                                throws InvalidClassFileException
        Ensure that the len bytes starting at offset fall within the attribute data.
        Throws:
        InvalidClassFileException - if the bytes fall outside the data
      • checkSizeEquals

        protected final void checkSizeEquals​(int offset,
                                             int len)
                                      throws InvalidClassFileException
        Ensure that the len bytes starting at offset end at the end of the attribute data.
        Throws:
        InvalidClassFileException - if the bytes do not end at the end of the attribute