org.apache.commons.classscan.builtin
Class UrlClassPath

java.lang.Object
  extended by org.apache.commons.classscan.builtin.UrlClassPath
All Implemented Interfaces:
ClassPath, SpiClassPath

public class UrlClassPath
extends Object
implements SpiClassPath


Constructor Summary
UrlClassPath(SpiMetaRegistry registry, URLClassLoader urlClassLoader)
           
 
Method Summary
 SpiMetaClassLoader createMetaClassLoader(SpiMetaRegistry registry, ClassLoader classLoader)
          Create a MetaClassLoader that will inspect the classes specified by this ClassPath
 List<? extends ClassPathElement> getClassPathElements()
          Get the collection of file base locations specified by this instance
 Map<ClassPathElement,ResourceFile> getResources(String fileName)
          Get files with a particular name
 void searchElements(Map<String,ClassPathElement> visited, Map<ClassPathElement,ResourceFile> resources, Collection<SpiClassPathElement> elements, String fileName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlClassPath

public UrlClassPath(SpiMetaRegistry registry,
                    URLClassLoader urlClassLoader)
Method Detail

getClassPathElements

public List<? extends ClassPathElement> getClassPathElements()
Description copied from interface: ClassPath
Get the collection of file base locations specified by this instance

Specified by:
getClassPathElements in interface ClassPath

createMetaClassLoader

public SpiMetaClassLoader createMetaClassLoader(SpiMetaRegistry registry,
                                                ClassLoader classLoader)
Description copied from interface: SpiClassPath
Create a MetaClassLoader that will inspect the classes specified by this ClassPath

Specified by:
createMetaClassLoader in interface SpiClassPath
Returns:
metadata about ClassLoader

getResources

public Map<ClassPathElement,ResourceFile> getResources(String fileName)
Description copied from interface: ClassPath
Get files with a particular name

Specified by:
getResources in interface ClassPath
Parameters:
fileName - The name of the desired file (this may be a path such as META-INF/resources/com.example.group.interface)
Returns:
A Map of base locations as the keys and absolute file locations as the values

searchElements

public void searchElements(Map<String,ClassPathElement> visited,
                           Map<ClassPathElement,ResourceFile> resources,
                           Collection<SpiClassPathElement> elements,
                           String fileName)


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.