Class ClassData


public class ClassData extends MemberData<ClassData>
Central class data for of the Java Disassembler
  • Field Details

  • Constructor Details

  • Method Details

    • read

      public void read(File inputFile) throws IOException
      Throws:
      IOException
    • read

      public void read(String inputFileName) throws IOException
      Throws:
      IOException
    • readFields

      protected void readFields(DataInputStream in) throws IOException
      Read and resolve the field data
      Throws:
      IOException
    • readMethods

      protected void readMethods(DataInputStream in) throws IOException
      Read and resolve the method data
      Throws:
      IOException
    • readInterfaces

      protected void readInterfaces(DataInputStream in) throws IOException
      Read and resolve the interface data
      Throws:
      IOException
    • handleAttributes

      protected boolean handleAttributes(DataInputStream in, EAttribute attributeTag, int attributeLength) throws IOException
      Read and resolve the attribute data
      Overrides:
      handleAttributes in class MemberData<ClassData>
      Throws:
      IOException
    • read

      public void read(DataInputStream in, Path src) throws IOException
      Read and resolve the class data
      Throws:
      IOException
    • initClassNames

      private void initClassNames(int this_cpx)
      Initializes class, package names needed for printing asm file
      Parameters:
      this_cpx - The constant_pool entry at that index is a CONSTANT_Class_info structure (ยง4.4.1) representing the class or interface defined by this class file or this_class is module-info in the case of a module.
    • hasPackage

      public boolean hasPackage()
      Determines if this Class has a package
      Returns:
      true if the package exists for this class
    • getSrcLine

      public String getSrcLine(int lineNum)
      Read and resolve the attribute data
    • printAnnotations

      @SafeVarargs private <T extends AnnotationData> void printAnnotations(List<T>... annotationLists) throws IOException
      Throws:
      IOException
    • print

      public void print() throws IOException
      Print asm file.
      Overrides:
      print in class Indenter
      Throws:
      IOException
    • printMemberDataList

      private boolean printMemberDataList(List<? extends MemberData> list, int commentOffset) throws IOException
      Prints list of either fields or methods
      Parameters:
      list - a list of fields or methods to be printed
      Returns:
      true if something were printed
      Throws:
      IOException - if something goes wrong
    • isPrintable

      boolean isPrintable(List<?>... lists)
    • isPrintable

      @SafeVarargs final <T extends Indenter> boolean isPrintable(T... list)