[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bcel-user
Subject:    RE: Need help modifying existing class
From:       "Bjoern Wuest" <bjoern.wuest () comtec ! e-technik ! uni-kassel ! de>
Date:       2003-05-09 6:38:19
[Download RAW message or body]

Hello

As I am not so experienced with BCEL, I did using the 'FieldGen' and
'MethodGen' classes in the 'org.apache.bcel.classfile' package. To use such
this operations, you need an instance of 'JavaClass'.
I tried to learn BCEL using the excellent BCELifier that you can find in
'org.apache.bcel.util'.
Here is a small example on how to use the BCELifier:

try {
	org.apache.bcel.util.ClassLoaderRepository clr = new
org.apache.bcel.util.ClassLoaderRepository(System.class.getClassLoader());
	org.apache.bcel.classfile.JavaClass cls =
clr.loadClass("me.you.AndClass");
	org.apache.bcel.util.BCELifier bf = new
org.apache.bcel.util.BCELifier(cls, System.out);
	bf.start();
} catch (Exception Ex) {
	Ex.printStackTrace();
}


Regards
  Bjoern


-----Original Message-----
From: Isaac.Goldstein@ny.frb.org [mailto:Isaac.Goldstein@ny.frb.org] 
Sent: Donnerstag, 8. Mai 2003 20:16
To: bcel-user@jakarta.apache.org
Subject: Need help modifying existing class


Hi all.  I'm a newbie to BCEL and I'm trying to figure out how to add fields
and methods to an existing class.  Can anyone show me a small example.

Thanks.



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


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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic