|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.shark.utilities.Loader
public class Loader
Field Summary | |
---|---|
boolean |
cacheFilled
|
Constructor Summary | |
---|---|
Loader()
Loader Initializion classCache - key(full class name) name without extension) - value(class file) cacheTimestamp - key(full class name) - value(timestamp for class file in classCache) |
|
Loader(com.lutris.util.Config config)
Loader Initializion classCache - key(full class name) name without extension) - value(class file) cacheTimestamp - key(full class name) - value(timestamp for class file in classCache) |
|
Loader(java.io.File propertyFile)
Loader Initializion classCache - key(full class name) name without extension) - value(class file) cacheTimestamp - key(full class name) - value(timestamp for class file in classCache) |
|
Loader(java.io.InputStream propertyIs)
Loader Initializion classCache - key(full class name) name without extension) - value(class file) cacheTimestamp - key(full class name) - value(timestamp for class file in classCache) |
|
Loader(java.util.Properties properties)
Loader Initializion classCache - key(full class name) name without extension) - value(class file) cacheTimestamp - key(full class name) - value(timestamp for class file in classCache) |
|
Loader(java.lang.String propertyFileName)
Loader Initializion classCache - key(full class name) name without extension) - value(class file) cacheTimestamp - key(full class name) - value(timestamp for class file in classCache) |
Method Summary | |
---|---|
void |
clearCaches()
|
void |
fillLoaderCache()
Method for searcing all file paths in mainRoot array calling recursive function searchingForFiles |
java.util.HashMap |
getClassCache()
|
com.lutris.logging.LogChannel |
GetLogChannel()
|
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultVal)
Function for getting property as String |
java.lang.String[] |
getPropertyArray(java.lang.String key,
java.lang.String[] defaultVal)
Function for getting property as String[] |
java.util.Date |
getTimestamp(java.lang.String classname)
|
boolean |
isCacheFilled()
|
java.lang.Class |
loadClass(java.lang.String fullClassName,
boolean force)
method loadClass if mode is "lazy" creates file from the full path to file Function needToReload is called for checking of timestamp values, and existing cache data for searched class Reloading class if it's necessarily This function returns class file |
java.lang.Class[] |
loadPackage(java.lang.String packageId,
boolean force)
|
void |
runThread(int time)
start thread |
void |
setLogChannel(com.lutris.logging.LogChannel newLogChannel)
Function for set logChannel |
void |
setProperty(java.lang.String key,
java.lang.String newVal)
Set property as String |
void |
setPropertyArray(java.lang.String key,
java.lang.String[] newValues)
Set property value as String[] , and remove old values |
boolean |
seveProperty()
Save property file |
void |
stopThread(int time)
stop thread |
void |
updateCache(java.util.HashMap updateCacheTimestamp,
java.util.HashMap updateClassCache,
java.util.HashMap tempTimestamp)
Update timestamp cache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public boolean cacheFilled
Constructor Detail |
---|
public Loader()
public Loader(java.lang.String propertyFileName)
propertyFileName
- - properties file namepublic Loader(java.io.File propertyFile)
propertyFile
- - properties filepublic Loader(java.io.InputStream propertyIs)
propertyIs
- - InputStream for properties filepublic Loader(java.util.Properties properties)
properties
- - properties objectpublic Loader(com.lutris.util.Config config) throws java.lang.Exception
config
- - config object
java.lang.Exception
Method Detail |
---|
public boolean isCacheFilled()
public java.lang.Class loadClass(java.lang.String fullClassName, boolean force) throws java.lang.Exception
fullClassName
- - full name of class(with package name) that should load
java.lang.ClassNotFoundException
java.lang.Exception
public java.util.Date getTimestamp(java.lang.String classname)
public java.lang.Class[] loadPackage(java.lang.String packageId, boolean force) throws java.lang.Exception
java.lang.Exception
public void fillLoaderCache() throws java.lang.Exception
java.lang.Exception
public java.lang.String getProperty(java.lang.String key, java.lang.String defaultVal)
key
- - key for property value in property filedefaultVal
- - String default value if value for given key doesn't exist
public java.lang.String[] getPropertyArray(java.lang.String key, java.lang.String[] defaultVal)
key
- - key for property value in property filedefaultVal
- - String[] default value if value for given key doesn't exist
public void setProperty(java.lang.String key, java.lang.String newVal)
key
- - key for property value in property filenewVal
- - String value that will be positioned in property objectpublic void setPropertyArray(java.lang.String key, java.lang.String[] newValues)
key
- - key for property value in property filenewValues
- - String[] of values that will be positioned in property objectpublic boolean seveProperty()
public void updateCache(java.util.HashMap updateCacheTimestamp, java.util.HashMap updateClassCache, java.util.HashMap tempTimestamp)
public void runThread(int time)
public void stopThread(int time)
public com.lutris.logging.LogChannel GetLogChannel()
public void setLogChannel(com.lutris.logging.LogChannel newLogChannel)
newLogChannel
- public java.util.HashMap getClassCache()
public void clearCaches()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |