Class ClasspathHelper


  • public final class ClasspathHelper
    extends java.lang.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.
    Since:
    27.07.2009
    Version:
    $Revision: 1.9 $
    Author:
    oliver
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.net.URI getParent​(java.net.URI path, java.lang.Class<?> clazz)
      Gets the parent of the given class.
      static java.net.URI getParent​(java.net.URI path, java.lang.String resource)
      Don't use @ProfileMe here!
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getParent

        public static java.net.URI getParent​(java.net.URI path,
                                             java.lang.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 java.net.URI getParent​(java.net.URI path,
                                             java.lang.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"