Example #1
0
 private String getConstantCharValue(char c) {
   StringBuilder sb = new StringBuilder();
   sb.append('\'');
   sb.append(esc(c, '\''));
   sb.append('\'');
   return sb.toString();
 }
Example #2
0
 private String getConstantStringValue(String s) {
   StringBuilder sb = new StringBuilder();
   sb.append("\"");
   for (int i = 0; i < s.length(); i++) {
     sb.append(esc(s.charAt(i), '"'));
   }
   sb.append("\"");
   return sb.toString();
 }