Back to project page SORM.
The source code is released under:
MIT License
If you think the Android project SORM listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.annotation.utils; //from ww w.java2s. co m public class NameBuilder { /** * build Index * @param tableName * @return index_tableName */ public static String buildIndex(String tableName){ return "index_"+tableName; } /** * build the getter method name<br> * e.g. if the Field is age ,it return 'getAge' * @param fieldName * @return */ public static String buildGetter(String fieldName) { return "get" + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); } /** * build the setter method name<br> * e.g. if the Field is age ,it return 'setAge' * @param fieldName * @return */ public static String buildSetter(String fieldName) { return "set" + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); } }