Class ClassFileInspector

java.lang.Object
net.jrodolfo.java_evolution.java24.class_file.ClassFileInspector

public class ClassFileInspector extends Object
Demonstrates parsing a compiled Java class with the Java 24 Class-File API.

The example accepts class-file bytes, parses them with ClassFile.parse(byte[]), and returns a small summary of the class. Tools can use the same API family to parse, generate, and transform class files without depending on third-party bytecode libraries for every use case.

  • Constructor Details

    • ClassFileInspector

      public ClassFileInspector()
  • Method Details

    • inspect

      public ClassFileSummary inspect(byte[] classFileBytes)
      Parses compiled class-file bytes.
      Parameters:
      classFileBytes - the bytes from a .class file
      Returns:
      a learner-friendly summary of the class file