Simplify the development of struts applications using class reflex mechanism

zhaozj2021-02-16  54

This is an article I published on IBM DeveloperWorks.

Http://www-900.ibm.com/developerWorks/cn/java/l-struts-reflect/

This trick may be helpful to your project progression of friends who are developing with Struts.

However, due to mistakes, that article leaks the next very important method, many friends send Mail asking me, so it is here.

// func: Returns the name of the corresponding set method according to the name of the field, such as the field name Name, return // setname // Para: columnname, field name ///pring string getSetMethodName (String Columnname) {string ret = "" ColumnName = columnname.tolowercase (); ret = "set" columnname.substring (0,1) .touppercase () columnname.substring (1, columnname.length ()); returnifet;}

转载请注明原文地址:https://www.9cbs.com/read-21535.html

New Post(0)