langtools/test/tools/javac/scope/HashCollisionTest.java
changeset 27224 228abfa87080
parent 25443 9187d77f2c64
child 27857 7e913a535736
equal deleted inserted replaced
27130:41df50e7303d 27224:228abfa87080
    38 import com.sun.tools.javac.util.*;
    38 import com.sun.tools.javac.util.*;
    39 import com.sun.tools.javac.code.*;
    39 import com.sun.tools.javac.code.*;
    40 import com.sun.tools.javac.code.Scope.*;
    40 import com.sun.tools.javac.code.Scope.*;
    41 import com.sun.tools.javac.code.Symbol.*;
    41 import com.sun.tools.javac.code.Symbol.*;
    42 import com.sun.tools.javac.file.JavacFileManager;
    42 import com.sun.tools.javac.file.JavacFileManager;
       
    43 
       
    44 import static com.sun.tools.javac.code.Kinds.Kind.*;
    43 
    45 
    44 public class HashCollisionTest {
    46 public class HashCollisionTest {
    45     public static void main(String... args) throws Exception {
    47     public static void main(String... args) throws Exception {
    46         new HashCollisionTest().run();
    48         new HashCollisionTest().run();
    47     }
    49     }
   114         // 6. Insert the contents of the package from 4.
   116         // 6. Insert the contents of the package from 4.
   115         Scope fromScope = p.members();
   117         Scope fromScope = p.members();
   116         ImportFilter typeFilter = new ImportFilter() {
   118         ImportFilter typeFilter = new ImportFilter() {
   117             @Override
   119             @Override
   118             public boolean accepts(Scope origin, Symbol sym) {
   120             public boolean accepts(Scope origin, Symbol sym) {
   119                 return sym.kind == Kinds.TYP;
   121                 return sym.kind == TYP;
   120             }
   122             }
   121         };
   123         };
   122         starImportScope.importAll(fromScope, fromScope, typeFilter, false);
   124         starImportScope.importAll(fromScope, fromScope, typeFilter, false);
   123 
   125 
   124         dump("imported p", starImportScope);
   126         dump("imported p", starImportScope);