Class ClassFileInspector
java.lang.Object
net.jrodolfo.java_evolution.java24.class_file.ClassFileInspector
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioninspect(byte[] classFileBytes) Parses compiled class-file bytes.
-
Constructor Details
-
ClassFileInspector
public ClassFileInspector()
-
-
Method Details
-
inspect
Parses compiled class-file bytes.- Parameters:
classFileBytes- the bytes from a.classfile- Returns:
- a learner-friendly summary of the class file
-