jd.xml.xpath.expr.function
Class FunctionLibrary

java.lang.Object
  extended byjd.xml.xpath.expr.function.FunctionLibrary
Direct Known Subclasses:
XPathFunctionLibrary

public class FunctionLibrary
extends Object

FunctionLibrary represents a set of functions.


Constructor Summary
FunctionLibrary()
          Create a FunctionLibrary.
FunctionLibrary(int size)
          Create a FunctionLibrary.
 
Method Summary
protected  void addFunction(String name, String className)
          Add a function to the library.
 boolean containsFunction(String name)
          Test if the library contains a function.
 Function createFunction(String name)
          Create the function with the given name.
 String getFunctionClassName(String name)
          Return the name of a function implentation.
 Enumeration getFunctionNames()
          Return a Enumeration of the function names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionLibrary

public FunctionLibrary()
Create a FunctionLibrary.


FunctionLibrary

public FunctionLibrary(int size)
Create a FunctionLibrary.

Parameters:
size - the expected size of the library.
Method Detail

addFunction

protected void addFunction(String name,
                           String className)
Add a function to the library.


containsFunction

public boolean containsFunction(String name)
Test if the library contains a function.


createFunction

public Function createFunction(String name)
                        throws InstantiationException,
                               ClassNotFoundException,
                               IllegalAccessException
Create the function with the given name.

Returns:
the function or null if the library does not contain such a function
Throws:
InstantiationException
ClassNotFoundException
IllegalAccessException

getFunctionClassName

public String getFunctionClassName(String name)
Return the name of a function implentation.

Returns:
the class name or null if the library does not contain such a function

getFunctionNames

public Enumeration getFunctionNames()
Return a Enumeration of the function names.