You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-user@jakarta.apache.org by   <rv...@thingfind.com> on 2004/08/05 20:59:46 UTC

Determining Local Variable Context

Hi everyone,
I'm trying to determine the context of a local variable.  I'm using inner classes, and these inner classes are instantiated off of an instance of the outer class.  The example below provides some info.  Basically, I want to know if BCEL can distinguish between innerA and innerB.  It cannot use the class names or any other seemingly obvious entries.  I have lengthy reasons for this.  Instead, is there any way to determine which instance object (a or b) is used to instantiate innerA or innerB?  If this is feasible in any means possible in BCEL, I will be interested.  I'm not sure if this is too much detail for BCEL.  Any help will be appreciated.



public class A {

    public class Inner {...}

}


public class B extends A {

    public class Inner extends A.Inner {...}

        public static void main(String args[]) {
            A a = new A();
            A.Inner innerA = a.new Inner();   //want to record that "a" was used
	
            B b = new B();
            B.Inner innerB = b.new Inner();   //want to record that "b" was used
        }

}




_____________________________________________________________
Get free email chat news and more ---> http://www.thingfind.com
Send a virtual greeting card!--->http://thingfind.com/cards/create.html 
Free domain names!--->http://signup.nom.vg

---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org