|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.altair.hwm.beans.utils.HWMClassLoader
public class HWMClassLoader
Title: HWMClassLoader
Description: This class will be the util class to load the beans. This is required because the bean class may not be in the classpath. It will use the URL Class loader to load it from a jar file.
Company: Altair Engineering, Inc.
Constructor Summary | |
---|---|
HWMClassLoader()
This default constructor will add all the jars to the CP from the system CP and from the lib dir |
|
HWMClassLoader(HWMClassLoader hwmClassLoader)
This constructor will take a previously created class loader and set it as the parent class loader |
Method Summary | |
---|---|
void |
AddJarsFromCP(java.lang.String strClassPath)
Extracts the jars from the classpath and adds it to the URL class loader |
java.net.URLClassLoader |
AddToClassPath(java.lang.String strClassPath)
Adds the given path to the class loader |
java.net.URLClassLoader |
AddToClassPath(java.lang.String[] arrstrClassPath)
Adds the given path to the class loader |
java.lang.String |
GetClasspath()
Returns the claspath to use while compiling the adapter classes |
com.altair.hwm.beans.utils.HWMURLClassLoader |
GetURLClassLoader()
Returns the URL class loader |
java.lang.Class |
LoadClass(java.lang.String strBeanClassName)
Loads the given class name by using a url class loader and searching in the jar files set until now |
java.lang.Class |
LoadClass(java.lang.String strBeanClassName,
java.lang.String strFileName)
Loads the given class name by using a url class loader and searching in the jar file given |
java.lang.Class |
LoadClassFromFile(java.lang.String strBeanClassName,
java.lang.String strFileName)
Loads the class using the HWMURLClassLoader. |
void |
PrintURLSHandled()
Prints out the URLs handled by this URL class loader |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HWMClassLoader(HWMClassLoader hwmClassLoader)
hwmClassLoader
- The parent class loaderpublic HWMClassLoader()
Method Detail |
---|
public void AddJarsFromCP(java.lang.String strClassPath)
strClassPath
- The system class pathpublic java.net.URLClassLoader AddToClassPath(java.lang.String strClassPath) throws java.net.MalformedURLException, java.lang.SecurityException
strClassPath
- The jar file name or a class path to a java class
MalformedURLException,
- SecurityException
java.net.MalformedURLException
java.lang.SecurityException
public java.net.URLClassLoader AddToClassPath(java.lang.String[] arrstrClassPath) throws java.net.MalformedURLException, java.lang.SecurityException
arrStrClassPath
- The array of jar file names or class paths to a
java class
MalformedURLException,
- SecurityException
java.net.MalformedURLException
java.lang.SecurityException
public java.lang.Class LoadClassFromFile(java.lang.String strBeanClassName, java.lang.String strFileName) throws java.lang.ClassNotFoundException, java.net.MalformedURLException, java.lang.SecurityException
strBeanClassName
- The class name to be loadedstrFileName
- The absolute file name of the java class
java.lang.ClassNotFoundException
- MalformedURLException,
SecurityException
java.net.MalformedURLException
java.lang.SecurityException
public java.lang.String GetClasspath()
public java.lang.Class LoadClass(java.lang.String strBeanClassName, java.lang.String strFileName) throws java.lang.ClassNotFoundException, java.net.MalformedURLException, java.lang.SecurityException
strBeanClassName
- The class name of the beanstrFileName
- The jar file name or path where the given class may
be found
java.lang.ClassNotFoundException
- MalformedURLException,
SecurityException
java.net.MalformedURLException
java.lang.SecurityException
public java.lang.Class LoadClass(java.lang.String strBeanClassName) throws java.lang.ClassNotFoundException, java.net.MalformedURLException, java.lang.SecurityException
strBeanClassName
- The class name of the bean
java.lang.ClassNotFoundException
- MalformedURLException,
SecurityException
java.net.MalformedURLException
java.lang.SecurityException
public void PrintURLSHandled()
public com.altair.hwm.beans.utils.HWMURLClassLoader GetURLClassLoader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |