Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

converting String to camelCase

807605Oct 11 2007 — edited Oct 11 2007
Hi 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...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 8 2007
Added on Oct 11 2007
9 comments
10,960 views