trouble with LDC
Simon IJskes <[email protected]> Sun, 8 Oct 2017 17:57:00 +0200
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
Hi,
i'm making a dependency verifier based on ASM6.0.
I'm using class files generated by 1.8.0_144.
// adhoq example:
class C {
static String c = "abc" ;
}
class R {
public void method()
{
String s = C.s ;
}
} ;
When R is parsed by ClassReader, ending up in MethodVisitor, the
public void visitLdcInsn( Object cst )
is passed a String with the value "abc". No way for the visitor to find
out its 'owner' was C. The javap disassembly reveals:
ldc #7
constant pool:
#7 = String #74
#74 = Utf8 abc
so, indeed no ref to the owner C.
i think, the only way to accurately verify the dependency is by walking
the constant pool. but how to access these? any hints? other ways to
find the owner?
Thanks,
Simon
--
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