public abstract class AsmDecompiler
extends Object
Utility class responsible for decompiling JVM class files into ClassStub objects that reflect their bytecode structure. Uses ASM to parse compiled bytecode and extract class metadata including fields, methods, constructors, and annotations without requiring access to source code.
Parsed stubs are cached using soft references indexed by URI, enabling efficient reuse across multiple compilations in the same JVM and in test scenarios. The cache occasionally allows misses when multiple threads simultaneously load the same class, but this is acceptable as it avoids serious memory issues.
The decompiler skips synthetic class initializers (<clinit>) and frame debug information during parsing.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static ClassStub |
parseClass(URL url)Loads the URL contents and parses them with ASM, producing a ClassStub object representing the structure of the corresponding class file. |
Loads the URL contents and parses them with ASM, producing a ClassStub object representing the structure of the corresponding class file. Stubs are cached and reused if queried several times with equal URLs.
url - a URL from a class loader, most likely a file system file or a JAR entry