langtools/src/share/classes/com/sun/tools/classfile/Dependencies.java
changeset 4550 af96bc3bdfb9
parent 4549 5288a060c75e
child 5520 86e4b9a9da40
equal deleted inserted replaced
4549:5288a060c75e 4550:af96bc3bdfb9
   412 
   412 
   413         public boolean accepts(Dependency dependency) {
   413         public boolean accepts(Dependency dependency) {
   414             return pattern.matcher(dependency.getTarget().getClassName()).matches();
   414             return pattern.matcher(dependency.getTarget().getClassName()).matches();
   415         }
   415         }
   416 
   416 
   417         Pattern pattern;
   417         private final Pattern pattern;
   418     }
   418     }
   419 
   419 
   420     /**
   420     /**
   421      * This class accepts those dependencies whose class name is in a given
   421      * This class accepts those dependencies whose class name is in a given
   422      * package.
   422      * package.
   446             }
   446             }
   447 
   447 
   448             return false;
   448             return false;
   449         }
   449         }
   450 
   450 
   451         Set<String> packageNames;
   451         private final Set<String> packageNames;
   452         boolean matchSubpackages;
   452         private final boolean matchSubpackages;
   453     }
   453     }
   454 
   454 
   455 
   455 
   456 
   456 
   457     /**
   457     /**
   541             return l;
   541             return l;
   542         }
   542         }
   543 
   543 
   544         class Visitor implements ConstantPool.Visitor<Void,Void>, Type.Visitor<Void, Void> {
   544         class Visitor implements ConstantPool.Visitor<Void,Void>, Type.Visitor<Void, Void> {
   545             private ConstantPool constant_pool;
   545             private ConstantPool constant_pool;
   546             private Set<Dependency> deps;
       
   547             private Location origin;
   546             private Location origin;
       
   547             Set<Dependency> deps;
   548 
   548 
   549             Visitor(ClassFile classFile) {
   549             Visitor(ClassFile classFile) {
   550                 try {
   550                 try {
   551                     constant_pool = classFile.constant_pool;
   551                     constant_pool = classFile.constant_pool;
   552                     origin = getLocation(classFile.getName());
   552                     origin = getLocation(classFile.getName());