public class JarURLClassLocator extends URLClassLocator
_fileType, _rootURL, CLASS_SUFFIXES, CLASS_TYPE, SOURCE_SUFFIXES, SOURCE_TYPEEMPTY_COLLECTION, EMPTY_LOCATOR, EMPTY_STRING_ARRAY| Modifier | Constructor and Description |
|---|---|
protected |
JarURLClassLocator(java.net.URL jarURL, int classType)
Constructs a new
JarURLClassLocator. |
| Modifier and Type | Method and Description |
|---|---|
void |
buildIndex()
Instructs this class locator to start building its index for locating files.
|
void |
getAllClasses(java.util.Collection<java.lang.String> out, ClassNameFilter filter)
Fetch all of the top-level classes that are known by this locator.
|
void |
getAllPackages(java.util.Collection<java.lang.String> out, PackageNameFilter filter)
Fetch all of the full packges that are known by this locator.
|
protected java.util.Collection<java.lang.String> |
getClassesDirectly()
Get the top-level classes that are known directly by this class locator, not including those known to child locators.
|
void |
getClassesInPackage(java.lang.String packagePrefix, java.util.Collection<java.lang.String> out)
Fetch the list of top-level classes within the given package, adding them to the out collection provided.
|
protected java.lang.Object |
getClasspathTreeNode()
Get the classpath tree node corresponding to this locator.
|
static long |
getLastBuiltTime() |
void |
getPackages(java.lang.String packagePrefix, java.util.Collection<java.lang.String> out)
Fetch the list of subpackages within the given package, adding them to the out collection provided.
|
protected java.util.Collection<java.net.URL> |
getResourcesDirectly(java.lang.String name)
Get the resources with the given name that are known directly by this class locator, not including those known to child locators.
|
java.net.URL |
getResourceURL(java.lang.String resourceName)
Fetch the URL for the Java resource file given the resource name.
|
java.net.URL |
getURL(java.lang.String fqClassName)
Fetch the URL for the JavaFile for the given fully-qualified Java class name.
|
getClassURL, getFileType, getRootURL, getSourceURL, isClassTypeLocator, isMatchingFileType, isMatchingFileType, isSourceTypeLocatoraddToCollection, buildFQName, buildIndexInterruptibly, checkInterrupt, ensureValid, getAllClasses, getAllClasses, getAllClassesInterruptibly, getAllClassesInterruptibly, getAllClassesInterruptibly, getAllPackages, getAllPackages, getAllPackagesInterruptibly, getAllPackagesInterruptibly, getAllPackagesInterruptibly, getChildLocators, getClassesByName, getClassesByNameInterruptibly, getClassesByPrefix, getClassesByPrefixInterruptibly, getClassesInPackage, getClassesInPackageInterruptibly, getClassesInPackageInterruptibly, getClassURLInterruptibly, getNameCascades, getNameParts, getPackages, getPackagesInterruptibly, getPackagesInterruptibly, getResourceURLs, getSourceLocator, getSourceURLInterruptibly, getStringArray, getURLInterruptibly, visitClasspathTree, visitClasspathTree, visitJavaTypes, visitJavaTypes, visitResources, visitResources
protected JarURLClassLocator(java.net.URL jarURL,
int classType)
JarURLClassLocator.jarURL - the root URL we are working withclassType - the file type, either CLASS_TYPE or SOURCE_TYPEpublic static long getLastBuiltTime()
public void buildIndex()
public void getPackages(java.lang.String packagePrefix,
java.util.Collection<java.lang.String> out)
getPackages in class BaseClassLocatorpackagePrefix - the package prefix, i.e., "java.io"out - the collection to add the packages
public void getClassesInPackage(java.lang.String packagePrefix,
java.util.Collection<java.lang.String> out)
getClassesInPackage in class BaseClassLocatorpackagePrefix - the package prefix, i.e., "java.io"out - the collection to add the class names
public void getAllClasses(java.util.Collection<java.lang.String> out,
ClassNameFilter filter)
getAllClasses in class BaseClassLocatorout - the collection to add the fully-qualified class namesfilter - the class name filter to useprotected java.util.Collection<java.lang.String> getClassesDirectly()
BaseClassLocatorgetClassesDirectly in class BaseClassLocatorprotected java.util.Collection<java.net.URL> getResourcesDirectly(java.lang.String name)
BaseClassLocatorgetResourcesDirectly in class BaseClassLocatorname - the resource name
public void getAllPackages(java.util.Collection<java.lang.String> out,
PackageNameFilter filter)
getAllPackages in class BaseClassLocatorout - the collection to add the full package namesfilter - the package name filter to usepublic java.net.URL getURL(java.lang.String fqClassName)
fqClassName - the fully-qualified class name in dotted notation, i.e., java.util.Map.Entry.public java.net.URL getResourceURL(java.lang.String resourceName)
resourceName - the full name of the resource including any file extensionsprotected java.lang.Object getClasspathTreeNode()
BaseClassLocatorgetClasspathTreeNode in class URLClassLocatornull if there is no classpath tree node corresponding to this locatorClasspathTree