Re: sudden class loading in asm
Eugene Kuleshov <[email protected]> Mon, 5 Dec 2011 16:25:54 -0500
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <CADFjdoULcm+QXUEVTEBa1cwVQwgQvx-ivVS4KfmHiLwqwnc3Sw@mail.gmail.com> |
You can provide your own implementation of the getCommonSuperClass() method, that won't use Class.isAssignableFrom(). There is an example in one of the ClassWriter unit tests. regards, Eugene On Mon, Dec 5, 2011 at 4:22 PM, Jochen Theodorou <[email protected]> wrote: > Hi all, > > looks like I once again have a problem with asm 4.0 > > while compiling Groovy I got this message > >> [groovyc] java.lang.RuntimeException: java.lang.ClassNotFoundException: >> groovy.swing.LookAndFeelHelper >> [groovyc] at >> org.objectweb.asm.ClassWriter.getCommonSuperClass(Unknown Source) >> [groovyc] at org.objectweb.asm.ClassWriter.a(Unknown Source) >> [groovyc] at org.objectweb.asm.Frame.a(Unknown Source) >> [groovyc] at org.objectweb.asm.Frame.a(Unknown Source) >> [groovyc] at org.objectweb.asm.MethodWriter.visitMaxs(Unknown Source) >> [groovyc] at >> org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:280) > > > looking at getCommonSuperClass it seems to me that this is related to the > frame calculation code, which I had to enable because it seems it is > required by indy. Now my problem is that > > ClassLoader classLoader = getClass().getClassLoader(); > > is not only a poor choice in many many cases, the class in question does not > even exist yet, thus cannot be found by any class loader. And that is > because this class is part of the set of classes I am currently compiling. > > Is my assumption right, that this is because of the frame calculation code? > And if that is the case, does this mean I will have to create the frames > myself then? Or is there a more easy way? > > bye blackdrag > > -- > Jochen "blackdrag" Theodorou - Groovy Project Tech Lead > blog: http://blackdragsview.blogspot.com/ > german groovy discussion newsgroup: de.comp.lang.misc > For Groovy programming sources visit http://groovy-lang.org > > > > -- > You receive this message as a subscriber of the [email protected] mailing list. > To unsubscribe: mailto:[email protected] > For general help: mailto:[email protected]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws >
message-footer.txt
(text/plain, 238 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws