Re: ClassFileTransformer and ClassWriter

Jochen Theodorou <[email protected]> Sun, 5 Mar 2017 20:02:53 +0100
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
On 04.03.2017 23:23, offbynull-asm wrote:
> I noticed that if ClassFileTransformer.transform() calls Class.forName()
> for a class that hasn't been passed to that transformer yet, that class
> will never get passed to that transformer.
>
> It looks like ClassWriter uses Class.forName() when it computes frames.
> How is it that people can use ClassWriter within a ClassFileTransformer
> without running in to this problem? Is there special logic somewhere in
> ASM that handles this?

We overwrite getCommonSuperType to provide our own proper 
implementations. In our case that means logic based on not yet realized 
classes since my case is the Groovy compiler

bye Jochen


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