Package org.apache.maven.surefire.booter
Class Classpath
- java.lang.Object
-
- org.apache.maven.surefire.booter.Classpath
-
- All Implemented Interfaces:
java.lang.Cloneable
,java.lang.Iterable<java.lang.String>
public final class Classpath extends java.lang.Object implements java.lang.Iterable<java.lang.String>, java.lang.Cloneable
An ordered list of classpath elements with set behaviour A Classpath is immutable and thread safe. Immutable and thread safe- Author:
- Kristian Rosenvold
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Classpath
addClassPathElementUrl(java.lang.String path)
Classpath
clone()
java.lang.ClassLoader
createClassLoader(boolean childDelegation, boolean enableAssertions, java.lang.String roleName)
static Classpath
emptyClasspath()
boolean
equals(java.lang.Object o)
java.util.List<java.net.URL>
getAsUrlList()
Deprecated.this should be package private method which returns List of Files.java.util.List<java.lang.String>
getClassPath()
java.lang.String
getCompactLogMessage(java.lang.String descriptor)
java.lang.String
getLogMessage(java.lang.String descriptor)
int
hashCode()
java.util.Iterator<java.lang.String>
iterator()
static Classpath
join(Classpath firstClasspath, Classpath secondClasspath)
void
writeToSystemProperty(java.lang.String propertyName)
-
-
-
Constructor Detail
-
Classpath
public Classpath(@Nonnull Classpath other, @Nonnull java.lang.String additionalElement)
-
Classpath
public Classpath(@Nonnull java.util.Collection<java.lang.String> elements)
-
-
Method Detail
-
emptyClasspath
public static Classpath emptyClasspath()
-
addClassPathElementUrl
public Classpath addClassPathElementUrl(java.lang.String path)
-
getClassPath
@Nonnull public java.util.List<java.lang.String> getClassPath()
-
getAsUrlList
@Deprecated public java.util.List<java.net.URL> getAsUrlList() throws java.net.MalformedURLException
Deprecated.this should be package private method which returns List of Files. It will be removed in the next major version.- Returns:
- list of
jar files paths
withfile
protocol in URL. - Throws:
java.net.MalformedURLException
- ifURL
could not be created upon given class-path element(s)
-
writeToSystemProperty
public void writeToSystemProperty(@Nonnull java.lang.String propertyName)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
createClassLoader
public java.lang.ClassLoader createClassLoader(boolean childDelegation, boolean enableAssertions, @Nonnull java.lang.String roleName) throws SurefireExecutionException
- Throws:
SurefireExecutionException
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getLogMessage
public java.lang.String getLogMessage(@Nonnull java.lang.String descriptor)
-
getCompactLogMessage
public java.lang.String getCompactLogMessage(@Nonnull java.lang.String descriptor)
-
iterator
public java.util.Iterator<java.lang.String> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<java.lang.String>
-
clone
public Classpath clone()
- Overrides:
clone
in classjava.lang.Object
-
-