Class ClasspathClasses
- java.lang.Object
-
- com.atlassian.confluence.util.classpath.ClasspathClasses
-
-
Constructor Summary
Constructors Constructor Description ClasspathClasses()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(URL jarUrl, String classFileName)
Associates a class with a JAR.void
addAll(URL jarUrl, Collection<String> classFileNames)
Associates all the given classes with a JAR.JarSet
getJarsForClass(String classFileName)
Returns a set of JAR URLs which contain a given class.SortedMap<String,Set<URL>>
getJarUrlsByClass()
Iterator<String>
iterator()
Returns an iterator over the class files on the classpath.int
size()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
add
public void add(URL jarUrl, String classFileName)
Associates a class with a JAR.- Parameters:
jarUrl
- the URL of a JAR on the classpathclassFileName
- the name of a class file in the JAR, in the form "java/lang/String.class"
-
addAll
public void addAll(URL jarUrl, Collection<String> classFileNames)
Associates all the given classes with a JAR.- Parameters:
jarUrl
- the URL of a JAR on the classpathclassFileNames
- the class file names in the JAR, in the form "java/lang/String.class"
-
iterator
public Iterator<String> iterator()
Returns an iterator over the class files on the classpath. Each is a String in the form "java/lang/String.class".
-
size
public int size()
-
getJarsForClass
public JarSet getJarsForClass(String classFileName)
Returns a set of JAR URLs which contain a given class.- Parameters:
classFileName
- the name of the class file, in the form "java/lang/String.class".- Returns:
- the set of JAR URLs containing the class, or an empty set if the class isn't found.
-
-