Class ClasspathHelper

java.lang.Object
clazzfish.monitor.util.ClasspathHelper

public final class ClasspathHelper extends Object
This class contains some helper classes which are used inside ClasspathMonitor and ClasspathDigger. Some of the methods were formerly placed in ClasspathMonitor but also needed by ClasspathDigger. To avoid dependencies from ClasspathDigger to ClasspathMonitor the common methods were moved to this class here.

Originally this class was part of the PatternTesting project.

Author:
oliver
  • Method Details

    • getParent

      public static URI getParent(URI path, String resource)
      Don't use @ProfileMe here! This method is also used when ProfileStatistic is set up!.
      Parameters:
      path - e.g. "jar:file:/a/b/c.jar!/d/e.class
      resource - e.g. "/d/e.class"
      Returns:
      e.g. "jar:file:/a/b/c.jar"
    • getParent

      public static URI getParent(URI path, Class<?> clazz)
      Gets the parent of the given class.
      Parameters:
      path - e.g. "jar:file:/a/b/c.jar!/d/e.class
      clazz - e.gl. "d.e.class"
      Returns:
      e.g. "jar:file:/a/b/c.jar"