(String mungedName)
| 3446 | } |
| 3447 | |
| 3448 | static public String demunge(String mungedName){ |
| 3449 | StringBuilder sb = new StringBuilder(); |
| 3450 | Matcher m = DEMUNGE_PATTERN.matcher(mungedName); |
| 3451 | int lastMatchEnd = 0; |
| 3452 | while (m.find()) |
| 3453 | { |
| 3454 | int start = m.start(); |
| 3455 | int end = m.end(); |
| 3456 | // Keep everything before the match |
| 3457 | sb.append(mungedName.substring(lastMatchEnd, start)); |
| 3458 | lastMatchEnd = end; |
| 3459 | // Replace the match with DEMUNGE_MAP result |
| 3460 | Character origCh = (Character) DEMUNGE_MAP.valAt(m.group()); |
| 3461 | sb.append(origCh); |
| 3462 | } |
| 3463 | // Keep everything after the last match |
| 3464 | sb.append(mungedName.substring(lastMatchEnd)); |
| 3465 | return sb.toString(); |
| 3466 | } |
| 3467 | |
| 3468 | public static class EmptyExpr implements Expr{ |
| 3469 | public final Object coll; |
no test coverage detected