Search code examples
java-bytecode-asm

ASM's Frame class has no generic type


ASM documentation (pdf) says, that Frame class has generic type, providing an example of usage: Frame<BasicValue>. (at p. 119, if needed)

When looking at the source, we can see it's declaration like Frame<V extends Value>.

But for some reason, when in my project I specify maven dependencies,

<dependency>
    <groupId>org.ow2.asm</groupId>
    <artifactId>asm</artifactId>
    <version>4.2</version>
</dependency>
<dependency>
     <groupId>org.ow2.asm</groupId>
     <artifactId>asm-analysis</artifactId>
     <version>4.2</version>
</dependency>

or just load according artifacts manually from repository, attempt to use Frame<...> ends with error:

Type org.objectweb.asm.tree.analysis.Frame doesn't have type parameters

And Intellij IDEA decompiler says Frame really has no ones.

The same issue takes place with Analyzer and Interpreter classes.

How can I beat that?


Solution

  • Complementing an answer of @dejvuth:

    asm-debug-all happens to be of Java 5.0 version and contains all generic types. Morever, it's binary compatible with plain asm library with no generics