Class ClassFileStruct

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileStruct
Direct Known Subclasses:
AnnotationInfo, ClassFileReader, FieldInfo, InnerClassInfo, MethodInfo, ModuleInfo, RecordComponentInfo, TypeAnnotationInfo

public abstract class ClassFileStruct extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    ClassFileStruct(byte[] classFileBytes, int[] offsets, int offset)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    doubleAt(int relativeOffset)
     
    float
    floatAt(int relativeOffset)
     
    int
    i4At(int relativeOffset)
     
    long
    i8At(int relativeOffset)
     
    protected void
     
    int
    u1At(int relativeOffset)
     
    int
    u2At(int relativeOffset)
     
    int
    u4At(int relativeOffset)
    Returns an 32 bit integer created of 4 bytes.
    char[]
    utf8At(int relativeOffset, int bytesAvailable)
     

    Methods inherited from class java.lang.Object

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

    • ClassFileStruct

      public ClassFileStruct(byte[] classFileBytes, int[] offsets, int offset)
  • Method Details

    • doubleAt

      public double doubleAt(int relativeOffset)
    • floatAt

      public float floatAt(int relativeOffset)
    • i4At

      public int i4At(int relativeOffset)
    • i8At

      public long i8At(int relativeOffset)
    • reset

      protected void reset()
    • u1At

      public int u1At(int relativeOffset)
    • u2At

      public int u2At(int relativeOffset)
    • u4At

      public int u4At(int relativeOffset)
      Returns an 32 bit integer created of 4 bytes. The return value should be treated as an unsigned integer! i.e. if the caller does math with the result he should use the unsigned methods from Integer like Integer.toUnsignedLong(int) or Integer.compareUnsigned(int, int). Note that addition with the + operator is safe to use.
      Parameters:
      relativeOffset - unsigned integer
      Returns:
      unsigned integer
    • utf8At

      public char[] utf8At(int relativeOffset, int bytesAvailable)