This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

modify existing class?


Hello,
is it posible to modify existing class using kawa? For example, I
would like to remove final modifier of the class and then save .class
to the filesystem.
I've tried following code but it doesn't work for my idea:

		ClassType ct = ClassType.make("test.MyFinalClass");
		
		ct.setModifiers(Access.PUBLIC);
		
		int mod = ct.getModifiers();
		System.out.println(mod);

		byte[] classFile = ct.writeToArray();
		System.out.println(classFile);
		
		ClassTypeWriter.print(ct, System.out, 0);

There is always only empty class, my methods from test.MyFinalClass
are not there. Could someone help meM
Thanks!
Luba


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]