Package patterntesting.runtime.util
Class ClasspathHelper
- java.lang.Object
-
- patterntesting.runtime.util.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!
-
-
-
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.classresource
- 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.classclazz
- e.gl. "d.e.class"- Returns:
- e.g. "jar:file:/a/b/c.jar"
-
-