jmathlib.core.functions
Class FileFunctionLoader

java.lang.Object
  extended by jmathlib.core.functions.FunctionLoader
      extended by jmathlib.core.functions.FileFunctionLoader
Direct Known Subclasses:
FunctionManager.SystemFileFunctionLoader

public class FileFunctionLoader
extends FunctionLoader

Class to load a Functions (whether they are compiled into class form, mFile or pFile) from a particular directory structure.


Field Summary
private  ExternalFunctionClassLoader classLoader
           
private  MFileLoader mLoader
           
private  FunctionPathBroker pathBroker
           
private  java.util.Vector paths
           
 
Constructor Summary
  FileFunctionLoader(java.io.File _functionDir, boolean _traverseChildren)
          Create the class loader
protected FileFunctionLoader(java.io.File _functionDir, boolean _traverseChildren, boolean _isSystemLoader)
           
 
Method Summary
 void checkAndRehashTimeStamps()
           
 Function findFunction(java.lang.String functionName)
          find unknown class/m-file in directory structure
 java.lang.Class findOnlyFunctionClass(java.lang.String functionName)
          Attempts to find a java class, that has the functionName
 java.io.File getBaseDirectory()
           
 java.io.File getPath(int index)
           
 int getPathCount()
           
 boolean getPFileCaching()
           
protected  Function parseFunctionFile(java.io.File functionFile, java.lang.String functionName)
           
 void setBaseDirectory(java.io.File dir)
           
 void setPFileCaching(boolean caching)
           
 
Methods inherited from class jmathlib.core.functions.FunctionLoader
cacheFunction, clearCache, clearCachedFunction, getCachedFunction, getCachedFunctionIterator, isSystemLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pathBroker

private FunctionPathBroker pathBroker

classLoader

private ExternalFunctionClassLoader classLoader

mLoader

private MFileLoader mLoader

paths

private java.util.Vector paths
Constructor Detail

FileFunctionLoader

protected FileFunctionLoader(java.io.File _functionDir,
                             boolean _traverseChildren,
                             boolean _isSystemLoader)

FileFunctionLoader

public FileFunctionLoader(java.io.File _functionDir,
                          boolean _traverseChildren)
Create the class loader

Parameters:
_functionDir - = the name of the base class directory
Method Detail

getBaseDirectory

public java.io.File getBaseDirectory()

setBaseDirectory

public void setBaseDirectory(java.io.File dir)

findOnlyFunctionClass

public java.lang.Class findOnlyFunctionClass(java.lang.String functionName)
Attempts to find a java class, that has the functionName


findFunction

public Function findFunction(java.lang.String functionName)
find unknown class/m-file in directory structure

Specified by:
findFunction in class FunctionLoader
Parameters:
fileName - = the file to look for

parseFunctionFile

protected Function parseFunctionFile(java.io.File functionFile,
                                     java.lang.String functionName)

setPFileCaching

public void setPFileCaching(boolean caching)
Specified by:
setPFileCaching in class FunctionLoader

getPFileCaching

public boolean getPFileCaching()
Specified by:
getPFileCaching in class FunctionLoader

getPathCount

public int getPathCount()
Returns:

getPath

public java.io.File getPath(int index)
Parameters:
index -
Returns:

checkAndRehashTimeStamps

public void checkAndRehashTimeStamps()
Specified by:
checkAndRehashTimeStamps in class FunctionLoader

FOOTER

BOTTOM