public class ClasspathDescriptorFileFinder extends Object implements DescriptorFileFinder
DescriptorFileFinder that
uses a particular classloader in order to find descriptor files.RESOURCE_BASE| Constructor and Description |
|---|
ClasspathDescriptorFileFinder()
If this constructor is used then HK2 descriptor files will be found
by looking in the classpath of the process.
|
ClasspathDescriptorFileFinder(ClassLoader cl)
This constructor can be used to select the particular classloader
to search for HK2 descriptor files.
|
ClasspathDescriptorFileFinder(ClassLoader cl,
String name)
This constructor can be used to select the particular classloader
to search for HK2 descriptor files.
|
| Modifier and Type | Method and Description |
|---|---|
List<InputStream> |
findDescriptorFiles()
Simple implementation of the findDescriptorFiles which does a
simple getResources on the classloader in order to find the
hk2 descriptor files
|
String |
toString() |
public ClasspathDescriptorFileFinder()
This is most commonly used when using HK2 from a stand-alone client in which all the JAR files are on a single classpath
public ClasspathDescriptorFileFinder(ClassLoader cl)
This is commonly used in more complex classloading scenarios where the HK2 descriptor files are not necessarily on the system classpath.
cl - May not be null and must be the classloader to use when
searching for HK2 descriptor filespublic ClasspathDescriptorFileFinder(ClassLoader cl, String name)
cl - May not be null and must be the classloader to use when
searching for HK2 descriptor filesname - Maynot be null and must be the name of the files to
search for in the META-INF/hk2-locator directorypublic List<InputStream> findDescriptorFiles() throws IOException
findDescriptorFiles in interface DescriptorFileFinderIOException - If there was an error finding the hk2 inhabitant filesCopyright © 2009-2014 Oracle Corporation. All Rights Reserved.