org.abstracthorizon.danube.tapestry
Class DanubeClassResolver

java.lang.Object
  extended by org.abstracthorizon.danube.tapestry.DanubeClassResolver
All Implemented Interfaces:
org.apache.hivemind.ClassResolver

public class DanubeClassResolver
extends Object
implements org.apache.hivemind.ClassResolver

ClassResolver implementation that uses supplied class loader

Author:
Daniel Sendula

Field Summary
protected  ClassLoader classLoader
          Class loader
 
Constructor Summary
DanubeClassResolver()
           
 
Method Summary
 Class checkForClass(String name)
          Checks if class is available for load.
 Class<?> findClass(String name)
          Finds a class from given name.
 ClassLoader getClassLoader()
          Returns class loader
 URL getResource(String name)
          Returns resource as url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classLoader

protected ClassLoader classLoader
Class loader

Constructor Detail

DanubeClassResolver

public DanubeClassResolver()
Method Detail

getResource

public URL getResource(String name)
Returns resource as url. It calls ClassLoader.getResource(String).

Specified by:
getResource in interface org.apache.hivemind.ClassResolver
Returns:
resource's url

findClass

public Class<?> findClass(String name)
Finds a class from given name. Calls ClassLoader.loadClass(String).

Specified by:
findClass in interface org.apache.hivemind.ClassResolver
Parameters:
name - class name
Returns:
class
Throws:
org.apache.hivemind.ApplicationRuntimeException

checkForClass

public Class checkForClass(String name)
Checks if class is available for load. If it is class would be returned. if not it returns null.

Specified by:
checkForClass in interface org.apache.hivemind.ClassResolver
Parameters:
name - class name
Returns:
class or null

getClassLoader

public ClassLoader getClassLoader()
Returns class loader

Specified by:
getClassLoader in interface org.apache.hivemind.ClassResolver
Returns:
class loader


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.