test_class.file: flash-waimai-generate/src/test/java/cn/enilu/flash/code/StrKitTest.java
test_class.identifier: StrKitTest
test_case.body: @Test
    public void testToUnderlineCase() {
      Assert.assertNull(StrKit.toUnderlineCase(null));
  
      Assert.assertEquals("1", StrKit.toUnderlineCase("1"));
      Assert.assertEquals("foo", StrKit.toUnderlineCase("foo"));
      Assert.assertEquals("bar", StrKit.toUnderlineCase("Bar"));
      Assert.assertEquals("baz", StrKit.toUnderlineCase("BAZ"));
      Assert.assertEquals("a1_b2_c3", StrKit.toUnderlineCase("A1B2C3"));
    }
test_case.class_method_signature: StrKitTest.testToUnderlineCase()
test_case.full_signature: @Test public void testToUnderlineCase()
test_case.identifier: testToUnderlineCase
test_case.invocations: assertNull toUnderlineCase assertEquals toUnderlineCase assertEquals toUnderlineCase assertEquals toUnderlineCase assertEquals toUnderlineCase assertEquals toUnderlineCase
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testToUnderlineCase()
focal_class.declarator: SPACE = " "
focal_class.modifier: public static final
focal_class.original_string: public static final String SPACE = " ";
focal_class.type: String
focal_class.var_name: SPACE
focal_class.declarator: DOT = "."
focal_class.modifier: public static final
focal_class.original_string: public static final String DOT = ".";
focal_class.type: String
focal_class.var_name: DOT
focal_class.declarator: SLASH = "/"
focal_class.modifier: public static final
focal_class.original_string: public static final String SLASH = "/";
focal_class.type: String
focal_class.var_name: SLASH
focal_class.declarator: BACKSLASH = "\\"
focal_class.modifier: public static final
focal_class.original_string: public static final String BACKSLASH = "\\";
focal_class.type: String
focal_class.var_name: BACKSLASH
focal_class.declarator: EMPTY = ""
focal_class.modifier: public static final
focal_class.original_string: public static final String EMPTY = "";
focal_class.type: String
focal_class.var_name: EMPTY
focal_class.declarator: CRLF = "\r\n"
focal_class.modifier: public static final
focal_class.original_string: public static final String CRLF = "\r\n";
focal_class.type: String
focal_class.var_name: CRLF
focal_class.declarator: NEWLINE = "\n"
focal_class.modifier: public static final
focal_class.original_string: public static final String NEWLINE = "\n";
focal_class.type: String
focal_class.var_name: NEWLINE
focal_class.declarator: UNDERLINE = "_"
focal_class.modifier: public static final
focal_class.original_string: public static final String UNDERLINE = "_";
focal_class.type: String
focal_class.var_name: UNDERLINE
focal_class.declarator: COMMA = ","
focal_class.modifier: public static final
focal_class.original_string: public static final String COMMA = ",";
focal_class.type: String
focal_class.var_name: COMMA
focal_class.declarator: HTML_NBSP = "&nbsp;"
focal_class.modifier: public static final
focal_class.original_string: public static final String HTML_NBSP = "&nbsp;";
focal_class.type: String
focal_class.var_name: HTML_NBSP
focal_class.declarator: HTML_AMP = "&amp"
focal_class.modifier: public static final
focal_class.original_string: public static final String HTML_AMP = "&amp";
focal_class.type: String
focal_class.var_name: HTML_AMP
focal_class.declarator: HTML_QUOTE = "&quot;"
focal_class.modifier: public static final
focal_class.original_string: public static final String HTML_QUOTE = "&quot;";
focal_class.type: String
focal_class.var_name: HTML_QUOTE
focal_class.declarator: HTML_LT = "&lt;"
focal_class.modifier: public static final
focal_class.original_string: public static final String HTML_LT = "&lt;";
focal_class.type: String
focal_class.var_name: HTML_LT
focal_class.declarator: HTML_GT = "&gt;"
focal_class.modifier: public static final
focal_class.original_string: public static final String HTML_GT = "&gt;";
focal_class.type: String
focal_class.var_name: HTML_GT
focal_class.declarator: EMPTY_JSON = "{}"
focal_class.modifier: public static final
focal_class.original_string: public static final String EMPTY_JSON = "{}";
focal_class.type: String
focal_class.var_name: EMPTY_JSON
focal_class.file: flash-waimai-generate/src/main/java/cn/enilu/flash/code/StrKit.java
focal_class.identifier: StrKit
focal_class.class_method_signature: StrKit.firstCharToLowerCase(String str)
focal_class.full_signature: public static String firstCharToLowerCase(String str)
focal_class.identifier: firstCharToLowerCase
focal_class.modifiers: public static
focal_class.parameters: (String str)
focal_class.return: String
focal_class.signature: String firstCharToLowerCase(String str)
focal_class.class_method_signature: StrKit.firstCharToUpperCase(String str)
focal_class.full_signature: public static String firstCharToUpperCase(String str)
focal_class.identifier: firstCharToUpperCase
focal_class.modifiers: public static
focal_class.parameters: (String str)
focal_class.return: String
focal_class.signature: String firstCharToUpperCase(String str)
focal_class.class_method_signature: StrKit.isEmpty(String str)
focal_class.full_signature: public static boolean isEmpty(String str)
focal_class.identifier: isEmpty
focal_class.modifiers: public static
focal_class.parameters: (String str)
focal_class.return: boolean
focal_class.signature: boolean isEmpty(String str)
focal_class.class_method_signature: StrKit.isNotEmpty(String str)
focal_class.full_signature: public static boolean isNotEmpty(String str)
focal_class.identifier: isNotEmpty
focal_class.modifiers: public static
focal_class.parameters: (String str)
focal_class.return: boolean
focal_class.signature: boolean isNotEmpty(String str)
focal_class.class_method_signature: StrKit.nullToEmpty(String str)
focal_class.full_signature: public static String nullToEmpty(String str)
focal_class.identifier: nullToEmpty
focal_class.modifiers: public static
focal_class.parameters: (String str)
focal_class.return: String
focal_class.signature: String nullToEmpty(String str)
focal_class.class_method_signature: StrKit.nullToDefault(String str, String defaultStr)
focal_class.full_signature: public static String nullToDefault(String str, String defaultStr)
focal_class.identifier: nullToDefault
focal_class.modifiers: public static
focal_class.parameters: (String str, String defaultStr)
focal_class.return: String
focal_class.signature: String nullToDefault(String str, String defaultStr)
focal_class.class_method_signature: StrKit.toUnderlineCase(String camelCaseStr)
focal_class.full_signature: public static String toUnderlineCase(String camelCaseStr)
focal_class.identifier: toUnderlineCase
focal_class.modifiers: public static
focal_class.parameters: (String camelCaseStr)
focal_class.return: String
focal_class.signature: String toUnderlineCase(String camelCaseStr)
focal_class.class_method_signature: StrKit.toCamelCase(String name)
focal_class.full_signature: public static String toCamelCase(String name)
focal_class.identifier: toCamelCase
focal_class.modifiers: public static
focal_class.parameters: (String name)
focal_class.return: String
focal_class.signature: String toCamelCase(String name)
focal_method.body: public static String toUnderlineCase(String camelCaseStr) {
  		if (camelCaseStr == null) {
  			return null;
  		}
  
  		final int length = camelCaseStr.length();
  		StringBuilder sb = new StringBuilder();
  		char c;
  		boolean isPreUpperCase = false;
  		for (int i = 0; i < length; i++) {
  			c = camelCaseStr.charAt(i);
  			boolean isNextUpperCase = true;
  			if (i < (length - 1)) {
  				isNextUpperCase = Character.isUpperCase(camelCaseStr.charAt(i + 1));
  			}
  			if (Character.isUpperCase(c)) {
  				if (!isPreUpperCase || !isNextUpperCase) {
  					if (i > 0){ sb.append(UNDERLINE);}
  				}
  				isPreUpperCase = true;
  			} else {
  				isPreUpperCase = false;
  			}
  			sb.append(Character.toLowerCase(c));
  		}
  		return sb.toString();
  	}
focal_method.class_method_signature: StrKit.toUnderlineCase(String camelCaseStr)
focal_method.full_signature: public static String toUnderlineCase(String camelCaseStr)
focal_method.identifier: toUnderlineCase
focal_method.invocations: length charAt isUpperCase charAt isUpperCase append append toLowerCase toString
focal_method.modifiers: public static
focal_method.parameters: (String camelCaseStr)
focal_method.return: String
focal_method.signature: String toUnderlineCase(String camelCaseStr)