ch.sahits.codegen.ui.java
Class ProjectClassLoaderV2

java.lang.Object
  extended by java.lang.ClassLoader
      extended by ch.sahits.codegen.ui.java.ProjectClassLoaderV2
Direct Known Subclasses:
ProjectGeneratorClassLoader, XMLInputFileGeneratorClassLoader

public class ProjectClassLoaderV2
extends java.lang.ClassLoader

This class loader searches first in the classpath of the current project and then in the classpath of all other projects of java nature on the workspace. This ClassLoader should only be extended by a ClassLoader that tries to load classes from the bundles or the projects in some specific manner or from a third location

Since:
1.2.0
Author:
Andi Hotz

Constructor Summary
ProjectClassLoaderV2(IJavaProject jProject)
          Initialize the project for witch the class should be loaded
 
Method Summary
protected  java.lang.Class<?> findClass(java.lang.String name)
           
 java.lang.Class<?> loadClass(java.lang.String name)
          Remove any generic stuff befor trying to load the class
 
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, 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

ProjectClassLoaderV2

public ProjectClassLoaderV2(IJavaProject jProject)
Initialize the project for witch the class should be loaded

Parameters:
jProject -
Method Detail

findClass

protected java.lang.Class<?> findClass(java.lang.String name)
                                throws java.lang.ClassNotFoundException
Overrides:
findClass in class java.lang.ClassLoader
Throws:
java.lang.ClassNotFoundException
See Also:
ClassLoader.findClass(java.lang.String)

loadClass

public java.lang.Class<?> loadClass(java.lang.String name)
                             throws java.lang.ClassNotFoundException
Remove any generic stuff befor trying to load the class

Overrides:
loadClass in class java.lang.ClassLoader
Throws:
java.lang.ClassNotFoundException
See Also:
ClassLoader.loadClass(java.lang.String)