src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java
changeset 55622 0b470386f5f7
parent 55358 28f4594b19c2
child 58109 ee07de0d2c16
child 58679 9c3209ff7550
child 58713 ad69fd32778e
equal deleted inserted replaced
55621:ea3b1a8fd4bb 55622:0b470386f5f7
   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     }