Yes, I am routinely using CheckClassAdapter, but it is seems that it is only making basic verification; i.e. what can be done without loading dependent classes. If you enable computing frames in ASM (computing frames do require some more information), then it tries to load the files using a classloader, which is not what I need: I need to have a way to represent classes without them being loaded as normal classes, with the hazards of running class initializers etc. Consider this usecase: running a class weaver inside eclipse, in response to builder events. There you do not want the real classes loaded at all. Also, CheckClassAdapter does not check the applicability of receivers and method arguments. If ASM could do those things, it would be awesome.
Working with Java byte code, I often find myself having something like Javassist's CtClass, except I want to use ASM and not get another class library mixed in. ASM is really nice and clean cut, imho. Being at run-time, I need something that can wrap *either* a real java class, *or* something loaded from bytecode path; or something that describes a class that does not exist yet (maybe it is just about to be bytecode generated). I have done several half-hearted attempts (ClassMirror in my kilim branch for instance), but it would be a great if someone did a full API for this that was compatible with ASM. On Dec 17, 10:47 am, Rémi Forax <[email protected]> wrote: > Le 17/12/2009 10:43, Kresten Krab Thorup a crit : > > > Added link to my off-line verifier, I find it really useful for > > understanding why the JVM won't accept my buggy byte code :-) > > > Click > > onhttp://groups.google.com/group/jvm-languages/web/jvm-bytecode-libraries > > - or copy& paste it into your browser's address bar if that doesn't > > work. > > ASM has also this kind of > stuff:http://asm.ow2.org/asm32/javadoc/user/org/objectweb/asm/util/CheckCla... > > It dumps the stack and the local variable types for each bytecode > instruction. > > R mi -- You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en.
