Class ClassProbe

java.lang.Object
eu.bandm.tools.util.ClassProbe

public class ClassProbe extends Object
Defines static methods for finding recursive static references to classes via breadth-first search.
  • Method Details

    • extractClassNames

      static Collection<String> extractClassNames(InputStream in) throws IOException
      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, or null 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 predicate null accepts anything.
      roots - references to classes to start with, given as binary names.