Package: org.codehaus.groovy.ast.decompiled

## [Java] Class AsmDecompiler

- org.codehaus.groovy.ast.decompiled.AsmDecompiler

-     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.

  See Also:
    ClassStub
    DecompiledClassNode
    AsmReferenceResolver

- - ### Methods Summary

    Methods
    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.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### 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. Stubs are cached and reused if queried several times with equal URLs.

      throws:
        IOException if reading from this URL is impossible
      throws:
        GroovyRuntimeException if the URL cannot be converted to a valid URI
      Parameters:
        `url` - a URL from a class loader, most likely a file system file or a JAR entry
      Returns:
        the class stub containing all extracted bytecode metadata