equal
deleted
inserted
replaced
405 * This is of the form {@code <enclClass> $ n <classname> } |
405 * This is of the form {@code <enclClass> $ n <classname> } |
406 * where |
406 * where |
407 * enclClass is the flat name of the enclosing class, |
407 * enclClass is the flat name of the enclosing class, |
408 * classname is the simple name of the local class |
408 * classname is the simple name of the local class |
409 */ |
409 */ |
410 Name localClassName(ClassSymbol c) { |
410 public Name localClassName(ClassSymbol c) { |
411 Name enclFlatname = c.owner.enclClass().flatname; |
411 Name enclFlatname = c.owner.enclClass().flatname; |
412 String enclFlatnameStr = enclFlatname.toString(); |
412 String enclFlatnameStr = enclFlatname.toString(); |
413 Pair<Name, Name> key = new Pair<>(enclFlatname, c.name); |
413 Pair<Name, Name> key = new Pair<>(enclFlatname, c.name); |
414 Integer index = localClassNameIndexes.get(key); |
414 Integer index = localClassNameIndexes.get(key); |
415 for (int i = (index == null) ? 1 : index; ; i++) { |
415 for (int i = (index == null) ? 1 : index; ; i++) { |
420 return flatname; |
420 return flatname; |
421 } |
421 } |
422 } |
422 } |
423 } |
423 } |
424 |
424 |
425 void clearLocalClassNameIndexes(ClassSymbol c) { |
425 public void clearLocalClassNameIndexes(ClassSymbol c) { |
426 if (c.owner != null && c.owner.kind != NIL) { |
426 if (c.owner != null && c.owner.kind != NIL) { |
427 localClassNameIndexes.remove(new Pair<>( |
427 localClassNameIndexes.remove(new Pair<>( |
428 c.owner.enclClass().flatname, c.name)); |
428 c.owner.enclClass().flatname, c.name)); |
429 } |
429 } |
430 } |
430 } |