opensubscriber
   Find in this group all groups
 
Unknown more information…

b : bcel-user@jakarta.apache.org 8 May 2009 • 1:01AM -0400

Class Constructor problem
by Abdullah Odeh Al-Zaghameem

REPLY TO AUTHOR
 
REPLY TO GROUP




Hi all,
 
I am working on a model that weave some code in classes bytecode at load-time. I face the following problem regarding the class constructor!! :
 
I tried first to modify the type of the constructor argument by using [setArgumentType], but i got a strange response!!!!; i.e. after saving back the bytecode and browsing it using some java-decompilers, the constructor's parameter type is still the same as the old one, at the new source code, BUT it was changed in the constant pool!!. (the <init> signature is changed) I found no mental explanation for that tell now.
 
Then, I tried to add a new constructor!! using BCEL, but I fail; I don't know if that because BCEL doesn't has the suitable APIs to do that, or its illigal to do such thing!!.
 
Any comments and ideas will be appreciated so much.
Thanks,
A. O .Z



Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

opensubscriber is not affiliated with the authors of this message nor responsible for its content.