org.jvnet.hk2.component.classmodel
Class ClassPath
java.lang.Object
org.jvnet.hk2.component.classmodel.ClassPath
public abstract class ClassPath
- extends Object
Helper for creating classpath approximating SE behavior.
- Author:
- Jerome Dochez, Jeff Trent
classPathEntries
public final LinkedHashSet<String> classPathEntries
expandedClassPathEntries
public final LinkedHashSet<String> expandedClassPathEntries
ClassPath
protected ClassPath(boolean allowTestClassPath)
ClassPath
public ClassPath(String classPath)
ClassPath
public ClassPath(Collection<File> classPath)
create
public static ClassPath create(Habitat h,
boolean allowTestClassPath)
- Creates a ClassPathHelper instance.
- Parameters:
h - reserved for future useallowTestClassPath - true if surefire.test.class.path is considered
- Returns:
- the ClassPathHelper
create
public static ClassPath create(Habitat h,
String classPath)
create
public static ClassPath create(Habitat h,
Collection<File> classPath)
initialize
protected void initialize(String classPath)
toString
public String toString()
- Overrides:
toString in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object another)
- Overrides:
equals in class Object
getEntries
public Set<String> getEntries()
- Find all jars referenced directly and indirectly via a classpath
specification typically drawn from java.class.path or
surefire.test.class.path System properties.
This will attempt to expand all manifest classpath entries.
- Returns:
- the set of entries in the classpath
getFileEntries
public Set<File> getFileEntries()
- See Also:
getEntries()
getRawURLs
public URL[] getRawURLs()
throws IOException
- Returns:
- the original classpath as specified (i.e., without transitive manifest dependencies)
- Throws:
IOException
Copyright © 2011 Oracle Corporation. All Rights Reserved.