Class ClasspathClasses
java.lang.Object
com.atlassian.confluence.util.classpath.ClasspathClasses
Classes on the classpath and the JARs that contain them.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Associates a class with a JAR.void
addAll
(URL jarUrl, Collection<String> classFileNames) Associates all the given classes with a JAR.getJarsForClass
(String classFileName) Returns a set of JAR URLs which contain a given class.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
-
Constructor Details
-
ClasspathClasses
public ClasspathClasses()
-
-
Method Details
-
add
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
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
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
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.
-
getJarUrlsByClass
-