Hi Class constructor can call super or this in it. Both are INVOKESPECIAL. Is there any way i can know if instrcution is calling super class method or any other method.
Class B extends A class B(int i) { super(i); } or class B(int i) { this(i,null); } class B(int i,String desc) { super(i); } I tried getting class name, but it is same for both super and this. int h = cp.addMethodref( oldClass.getClassName(), m.getName(), signature); IVOKESPECIAL newinst1 = new INVOKESPECIAL(h); System.out.println("************************ "+newinst1.getClassName(cp)); Both cases above reutns class B for first constructor with integer parameter. How do i know that method is calling super or non-super in BCEL? Thanks in advance. -- View this message in context: http://old.nabble.com/In-BCEL-how-to-know-if-method-is-calling-super-method-or-any-non-super-method-tp26891746p26891746.html Sent from the BCEL - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: bcel-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: bcel-user-h...@jakarta.apache.org