|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jibx.binding.classes.ClassCache
public class ClassCache
Cache for class files being modified. Handles loading and saving of class files. Classes are loaded directly from the file system paths supplied on initialization in preference to the system class path.
Field Summary | |
---|---|
private java.util.HashMap |
m_classMap
Map from class names to actual class information. |
private java.lang.String[] |
m_paths
Paths to be searched for class files. |
private java.io.File[] |
m_roots
Root directories corresponding to paths. |
private static ClassCache |
s_instance
Singleton instance of class (created when paths set) |
Constructor Summary | |
---|---|
private |
ClassCache(java.lang.String[] paths)
Constructor. |
Method Summary | |
---|---|
(package private) static void |
addClassFile(ClassFile cf)
Add created class information to cache. |
static ClassFile |
getClassFile(java.lang.String name)
Get class information. |
private ClassFile |
getClassFileImpl(java.lang.String name)
Get class information. |
static boolean |
hasClassFile(java.lang.String name)
Check if class information has been loaded. |
static void |
setPaths(java.lang.String[] paths)
Set class paths to be searched. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static ClassCache s_instance
private java.lang.String[] m_paths
private java.io.File[] m_roots
private java.util.HashMap m_classMap
Constructor Detail |
---|
private ClassCache(java.lang.String[] paths)
paths
- ordered set of paths to be searched for class filesMethod Detail |
---|
private ClassFile getClassFileImpl(java.lang.String name) throws JiBXException
name
- fully-qualified name of class to be found
null
if class not found
JiBXException
- on any error accessing class filepublic static ClassFile getClassFile(java.lang.String name) throws JiBXException
name
- fully-qualified name of class to be found
null
if class not found
JiBXException
- on any error accessing class filepublic static boolean hasClassFile(java.lang.String name)
name
- full-qualified name of class to be checked
true
if foundstatic void addClassFile(ClassFile cf)
cf
- information for class to be addedpublic static void setPaths(java.lang.String[] paths)
paths
- ordered set of paths to be searched for class files
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |