Package eu.bandm.tools.util
Class ClassProbe
java.lang.Object
eu.bandm.tools.util.ClassProbe
Defines static methods for finding recursive static references to
classes via breadth-first search.
-
Method Summary
Modifier and TypeMethodDescription(package private) static Collection<String>
Delivers a list of all class names which are referred in the input.static Collection<String>
Find all recursive static references to classes.
-
Method Details
-
extractClassNames
Delivers a list of all class names which are referred in the input.- Parameters:
in
- the class data conformant to a valid class file as defined by The Java™ Virtual Machine Specification.- Throws:
IOException
-
findClasses
public static Collection<String> findClasses(@Opt @Opt String targetClassPath, @Opt @Opt Predicate<? super String> filter, String... roots) Find all recursive static references to classes.- Parameters:
targetClassPath
- the class path to use for loading the referenced classes, ornull
for the system class path.filter
- a predicate to filter the class references. References to classes that are not accepted by this predicate are not loaded or traversed. The predicatenull
accepts anything.roots
- references to classes to start with, given as binary names.
-