Class ClassLoadingUtil


  • public final class ClassLoadingUtil
    extends java.lang.Object
    A utility class containing methods to dynamically load classes into the eclipse workspace JVM.
    Author:
    Rene Schneider - initial API and implementation
    • Constructor Summary

      Constructors 
      Constructor Description
      ClassLoadingUtil()
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void finalize()
      Finalizes an instance.
      java.lang.Class<?> loadClassFromWorkspace​(java.lang.String aClassName, org.eclipse.jdt.core.IJavaProject aProject)
      Loads a class defined in a specific project into the Eclipse JVM.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ClassLoadingUtil

        public ClassLoadingUtil()
        Creates a new instance.
    • Method Detail

      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Finalizes an instance.
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • loadClassFromWorkspace

        public java.lang.Class<?> loadClassFromWorkspace​(java.lang.String aClassName,
                                                         org.eclipse.jdt.core.IJavaProject aProject)
                                                  throws java.lang.ClassNotFoundException
        Loads a class defined in a specific project into the Eclipse JVM.
        Parameters:
        aClassName - the fully qualified class name
        aProject - the project where the class resides
        Returns:
        the loaded class
        Throws:
        java.lang.ClassNotFoundException