JavaBeansUtil { public static String getGetterMethodName(String property, FullyQualifiedJavaType fullyQualifiedJavaType) { StringBuilder sb = new StringBuilder(); sb.append(property); if (Character.isLowerCase(sb.charAt(0)) && (sb.length() == 1 || !Character.isUpperCase(sb.charAt(1)))) { sb.setCharAt(0, Character.toUpperCase(sb.charAt(0))); } if (fullyQualifiedJavaType.equals(FullyQualifiedJavaType .getBooleanPrimitiveInstance())) { sb.insert(0, "is"); } else { sb.insert(0, "get"); } return sb.toString(); } private  JavaBeansUtil(); static String getGetterMethodName(String property,
            FullyQualifiedJavaType fullyQualifiedJavaType); static String getSetterMethodName(String property); static String getFirstCharacterUppercase(String inputString); static String getCamelCaseString(String inputString,
            boolean firstCharacterUppercase); static String getValidPropertyName(String inputString); static Method getJavaBeansGetter(IntrospectedColumn introspectedColumn,
            Context context,
            IntrospectedTable introspectedTable); static Method getJavaBeansGetterWithGeneratedAnnotation(IntrospectedColumn introspectedColumn,
            Context context, IntrospectedTable introspectedTable, CompilationUnit compilationUnit); static Field getJavaBeansField(IntrospectedColumn introspectedColumn,
            Context context,
            IntrospectedTable introspectedTable); static Field getJavaBeansFieldWithGeneratedAnnotation(IntrospectedColumn introspectedColumn,
            Context context,
            IntrospectedTable introspectedTable,
            CompilationUnit compilationUnit); static Method getJavaBeansSetter(IntrospectedColumn introspectedColumn,
            Context context,
            IntrospectedTable introspectedTable); static Method getJavaBeansSetterWithGeneratedAnnotation(IntrospectedColumn introspectedColumn,
            Context context,
            IntrospectedTable introspectedTable, CompilationUnit compilationUnit);  }
@Test public void testGetGetterMethodName() { assertEquals("geteMail", getGetterMethodName("eMail", FullyQualifiedJavaType.getStringInstance())); assertEquals("getFirstName", getGetterMethodName("firstName", FullyQualifiedJavaType.getStringInstance())); assertEquals("getURL", getGetterMethodName("URL", FullyQualifiedJavaType.getStringInstance())); assertEquals("getXAxis", getGetterMethodName("XAxis", FullyQualifiedJavaType.getStringInstance())); assertEquals("getA", getGetterMethodName("a", FullyQualifiedJavaType.getStringInstance())); assertEquals("isActive", getGetterMethodName("active", FullyQualifiedJavaType.getBooleanPrimitiveInstance())); assertEquals("getI_PARAM_INT_1", getGetterMethodName("i_PARAM_INT_1", FullyQualifiedJavaType.getStringInstance())); assertEquals("get_fred", getGetterMethodName("_fred", FullyQualifiedJavaType.getStringInstance())); assertEquals("getAccountType", getGetterMethodName("AccountType", FullyQualifiedJavaType.getStringInstance())); }