langtools/src/jdk.compiler/share/classes/com/sun/tools/classfile/Dependencies.java
equal
deleted
inserted
replaced
28 import java.util.HashMap; |
28 import java.util.HashMap; |
29 import java.util.HashSet; |
29 import java.util.HashSet; |
30 import java.util.LinkedList; |
30 import java.util.LinkedList; |
31 import java.util.List; |
31 import java.util.List; |
32 import java.util.Map; |
32 import java.util.Map; |
|
33 import java.util.Objects; |
33 import java.util.Set; |
34 import java.util.Set; |
34 import java.util.regex.Pattern; |
35 import java.util.regex.Pattern; |
35 |
36 |
36 import com.sun.tools.classfile.Dependency.Filter; |
37 import com.sun.tools.classfile.Dependency.Filter; |
37 import com.sun.tools.classfile.Dependency.Finder; |
38 import com.sun.tools.classfile.Dependency.Finder; |
41 import com.sun.tools.classfile.Type.ClassType; |
42 import com.sun.tools.classfile.Type.ClassType; |
42 import com.sun.tools.classfile.Type.MethodType; |
43 import com.sun.tools.classfile.Type.MethodType; |
43 import com.sun.tools.classfile.Type.SimpleType; |
44 import com.sun.tools.classfile.Type.SimpleType; |
44 import com.sun.tools.classfile.Type.TypeParamType; |
45 import com.sun.tools.classfile.Type.TypeParamType; |
45 import com.sun.tools.classfile.Type.WildcardType; |
46 import com.sun.tools.classfile.Type.WildcardType; |
|
47 |
46 import static com.sun.tools.classfile.ConstantPool.*; |
48 import static com.sun.tools.classfile.ConstantPool.*; |
47 |
49 |
48 /** |
50 /** |
49 * A framework for determining {@link Dependency dependencies} between class files. |
51 * A framework for determining {@link Dependency dependencies} between class files. |
50 * |
52 * |
163 /** |
165 /** |
164 * Set the finder used to locate the dependencies for a class. |
166 * Set the finder used to locate the dependencies for a class. |
165 * @param f the finder |
167 * @param f the finder |
166 */ |
168 */ |
167 public void setFinder(Finder f) { |
169 public void setFinder(Finder f) { |
168 f.getClass(); // null check |
170 finder = Objects.requireNonNull(f); |
169 finder = f; |
|
170 } |
171 } |
171 |
172 |
172 /** |
173 /** |
173 * Get the default filter used to determine included when searching |
174 * Get the default filter used to determine included when searching |
174 * the transitive closure of all the dependencies. |
175 * the transitive closure of all the dependencies. |
218 * Set the filter used to determine the dependencies included when searching |
219 * Set the filter used to determine the dependencies included when searching |
219 * the transitive closure of all the dependencies. |
220 * the transitive closure of all the dependencies. |
220 * @param f the filter |
221 * @param f the filter |
221 */ |
222 */ |
222 public void setFilter(Filter f) { |
223 public void setFilter(Filter f) { |
223 f.getClass(); // null check |
224 filter = Objects.requireNonNull(f); |
224 filter = f; |
|
225 } |
225 } |
226 |
226 |
227 /** |
227 /** |
228 * Find the dependencies of a class, using the current |
228 * Find the dependencies of a class, using the current |
229 * {@link Dependencies#getFinder finder} and |
229 * {@link Dependencies#getFinder finder} and |