Let's say I have the following classes:
class A {
static public String a;
}
class B {
public function referToFieldInClassA() {
System.out.println(A.a);
}
}
Is there anything in the Java reflection APIs to allow me to find all places where a particular field is referenced? What I'm looking for is a way to find out that (given the example) class B has a reference to A.a.
I know I can get all the Fields in a Class via the reflection API. But now I want to find all references to that Field.
Thanks.