converting String to camelCase
807605Oct 11 2007 — edited Oct 11 2007Hi All,
I have couple of questions
1. I want to convert normal java string into camelCase.
e.g. JAVA_FORUM should be converted to javaForum or java_Forum
2. I have created a utility class which extracts Table structure from Database and creates an xml file. The structure of this xml file is
<database>
<table name="ACTIVITY_FUNCTION">
<column name="ACTIVITY_ID" type="java.math.BigDecimal"/>
<column name="FUNCTION_ID" type="java.math.BigDecimal"/>
</table>
</databse>
Now i am applying XSLT on this xml to create java class. The problem here is the generated java class doesnt follow standard naming convention for instance variable as well as the getters and setters.
private java.math.BigDecimal ACTIVITY_ID;
public java.math.BigDecimal getACTIVITY_ID() {
return ACTIVITY_ID;
}
public void setACTIVITY_ID
(java.math.BigDecimal ACTIVITY_ID) {
this.ACTIVITY_ID = ACTIVITY_ID;
}
is there any way i can create java classes with proper naming convention?
Thanks in advance...