net.sourceforge.jane
Class ClassLoaderArtifactLocator

java.lang.Object
  |
  +--net.sourceforge.jane.ClassLoaderArtifactLocator
All Implemented Interfaces:
ArtifactLocator

public class ClassLoaderArtifactLocator
extends java.lang.Object
implements ArtifactLocator

Locates artifacts using a class loader.


Field Summary
static java.lang.String TYPE
           
 
Constructor Summary
ClassLoaderArtifactLocator(java.lang.ClassLoader aClassLoader)
          Create a new ClassLoaderArtifactLocator.
 
Method Summary
 boolean canFindClass(java.lang.String className)
          Returns true if this locator can find the given class.
 java.lang.ClassLoader getClassLoader()
          Returns the class loader.
static ArtifactLocator getContextInstance()
          Returns an instance of this locator that locates artifacts using the current thread's context class loader.
static ArtifactLocator getSystemInstance()
          Returns an instance of this locator that locates artifacts using a system class loader.
 java.lang.String getType()
          Returns the type of locator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

public static final java.lang.String TYPE
Constructor Detail

ClassLoaderArtifactLocator

public ClassLoaderArtifactLocator(java.lang.ClassLoader aClassLoader)
Create a new ClassLoaderArtifactLocator.
Method Detail

getType

public java.lang.String getType()
Returns the type of locator.
Specified by:
getType in interface ArtifactLocator

canFindClass

public boolean canFindClass(java.lang.String className)
Returns true if this locator can find the given class.
Specified by:
canFindClass in interface ArtifactLocator

getClassLoader

public java.lang.ClassLoader getClassLoader()
Returns the class loader.

getSystemInstance

public static ArtifactLocator getSystemInstance()
Returns an instance of this locator that locates artifacts using a system class loader.

getContextInstance

public static ArtifactLocator getContextInstance()
Returns an instance of this locator that locates artifacts using the current thread's context class loader.


Copyright © 2002-2002 SourceForge. All Rights Reserved.