Find out the reason. I add the method too early. I add the method before I add
body part of the method.
CtMethod m = CtNewMethod.make("public java.lang.String getISBN();", cls);
cls.addMethod(m); ///wrong, too early to do so.
m.setBody("return _ISBN;");
The correct way is:
CtMethod m = CtNewMethod.make("public java.lang.String getISBN();", cls);
m.setBody("return _ISBN;");
cls.addMethod(m); ///Now it's not an abstract method
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3946549#3946549
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3946549
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user