patterntesting.runtime.util
Class ClasspathHelper

Package class diagram package ClasspathHelper
java.lang.Object
  extended by patterntesting.runtime.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.

Since:
27.07.2009
Version:
$Revision: 1.4 $
Author:
oliver

Method Summary
static URI getParent(URI path, Class<?> clazz)
          Gets the parent of the given class.
static URI getParent(URI path, 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 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"


Copyright © 2002–2014 PatternTesting Team. All rights reserved.