anon.util
Class ClassUtil.ClassInstantiator
java.lang.Object
anon.util.ClassUtil.ClassInstantiator
- All Implemented Interfaces:
- IResourceInstantiator
- Enclosing class:
- ClassUtil
private static class ClassUtil.ClassInstantiator
- extends java.lang.Object
- implements IResourceInstantiator
Method Summary |
private void |
checkValidity(java.lang.Class a_loadedClass,
java.lang.String a_filename)
|
java.lang.Object |
getInstance(java.io.File a_file,
java.io.File a_topDirectory)
Loads a file and transforms it into a concrete object. |
java.lang.Object |
getInstance(java.util.zip.ZipEntry a_entry,
java.util.zip.ZipFile a_file)
Loads a file and transforms it into a concrete object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_invalidAfterFailure
private int m_invalidAfterFailure
m_currentFailure
private int m_currentFailure
ClassUtil.ClassInstantiator
public ClassUtil.ClassInstantiator()
ClassUtil.ClassInstantiator
public ClassUtil.ClassInstantiator(int a_invalidAfterFailure)
getInstance
public java.lang.Object getInstance(java.io.File a_file,
java.io.File a_topDirectory)
throws IResourceInstantiator.ResourceInstantiationException
- Description copied from interface:
IResourceInstantiator
- Loads a file and transforms it into a concrete object.
- Specified by:
getInstance
in interface IResourceInstantiator
- Parameters:
a_file
- a Filea_topDirectory
- the top directory of this file; this is generally not needed to load
the file
- Returns:
- an Object
- Throws:
IResourceInstantiator.ResourceInstantiationException
- if an error occurs
getInstance
public java.lang.Object getInstance(java.util.zip.ZipEntry a_entry,
java.util.zip.ZipFile a_file)
throws IResourceInstantiator.ResourceInstantiationException
- Description copied from interface:
IResourceInstantiator
- Loads a file and transforms it into a concrete object. Please not that JDK 1.1.8 does not
correctly load zip entries! Please use the method ResourceLoader.loadResource(String)
instead. By this way, only zip/jar files in the classpath may be loaded.
- Specified by:
getInstance
in interface IResourceInstantiator
- Parameters:
a_entry
- a ZipEntrya_file
- the ZipFile of this zip entry
- Returns:
- an Object
- Throws:
IResourceInstantiator.ResourceInstantiationException
- if an error occurs
checkValidity
private void checkValidity(java.lang.Class a_loadedClass,
java.lang.String a_filename)
throws IResourceInstantiator.ResourceInstantiationException
- Throws:
IResourceInstantiator.ResourceInstantiationException