nl.beesting.beangenerator.locators.methodlocators
Class DirectoryClassResolver

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by nl.beesting.beangenerator.locators.methodlocators.DirectoryClassResolver
All Implemented Interfaces:
ClassResolver

public class DirectoryClassResolver
extends java.security.SecureClassLoader
implements ClassResolver

DirectoryClassResolver extends SecureClassLoader to load the classes that it found will search classpath directories for a class with specified name.


Constructor Summary
DirectoryClassResolver(java.util.List<java.io.File> files)
          Create a DirectoryClassResolver with a list of classpath directory locations.
 
Method Summary
 java.lang.Class<?> findClass(java.lang.String name)
          Find a class with given name regardless of the package
 
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass, getPermissions
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryClassResolver

public DirectoryClassResolver(java.util.List<java.io.File> files)
Create a DirectoryClassResolver with a list of classpath directory locations.

Parameters:
files - the classpath directories
Method Detail

findClass

public java.lang.Class<?> findClass(java.lang.String name)
Find a class with given name regardless of the package

Specified by:
findClass in interface ClassResolver
Overrides:
findClass in class java.lang.ClassLoader
Parameters:
name - the name of the class
Returns:
the found class or null if none was found


Copyright 2008. All Rights Reserved.