| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xpath.compiler.FunctionTable
public class FunctionTable
The function table for XPath.
| Field Summary | |
|---|---|
| static int | FUNC_BOOLEANThe 'boolean()' id. | 
| static int | FUNC_CEILINGThe 'ceiling()' id. | 
| static int | FUNC_CONCATThe 'concat()' id. | 
| static int | FUNC_CONTAINSThe 'contains()' id. | 
| static int | FUNC_COUNTThe 'count()' id. | 
| static int | FUNC_CURRENTThe 'current()' id. | 
| static int | FUNC_DOCLOCATIONThe 'document-location()' id (Proprietary). | 
| static int | FUNC_EXT_ELEM_AVAILABLEThe 'element-available()' id (XSLT). | 
| static int | FUNC_EXT_FUNCTION_AVAILABLEThe 'function-available()' id (XSLT). | 
| static int | FUNC_FALSEThe 'false()' id. | 
| static int | FUNC_FLOORThe 'floor()' id. | 
| static int | FUNC_GENERATE_IDThe 'generate-id()' id. | 
| static int | FUNC_IDThe 'id()' id. | 
| static int | FUNC_KEYThe 'key()' id (XSLT). | 
| static int | FUNC_LANGThe 'lang()' id. | 
| static int | FUNC_LASTThe 'last()' id. | 
| static int | FUNC_LOCAL_PARTThe 'local-name()' id. | 
| static int | FUNC_NAMESPACEThe 'namespace-uri()' id. | 
| static int | FUNC_NORMALIZE_SPACEThe 'normalize-space()' id. | 
| static int | FUNC_NOTThe 'not()' id. | 
| static int | FUNC_NUMBERThe 'number()' id. | 
| static int | FUNC_POSITIONThe 'position()' id. | 
| static int | FUNC_QNAMEThe 'name()' id. | 
| static int | FUNC_ROUNDThe 'round()' id. | 
| static int | FUNC_STARTS_WITHThe 'starts-with()' id. | 
| static int | FUNC_STRINGThe 'string()' id. | 
| static int | FUNC_STRING_LENGTHThe 'string-length()' id. | 
| static int | FUNC_SUBSTRINGThe 'substring()' id. | 
| static int | FUNC_SUBSTRING_AFTERThe 'substring-after()' id. | 
| static int | FUNC_SUBSTRING_BEFOREThe 'substring-before()' id. | 
| static int | FUNC_SUMThe 'sum()' id. | 
| static int | FUNC_SYSTEM_PROPERTYThe 'system-property()' id. | 
| static int | FUNC_TRANSLATEThe 'translate()' id. | 
| static int | FUNC_TRUEThe 'true()' id. | 
| static int | FUNC_UNPARSED_ENTITY_URIThe 'unparsed-entity-uri()' id (XSLT). | 
| private  int | m_funcNextFreeIndexThe index to the next free function index. | 
| private static java.util.HashMap | m_functionIDTable of function name to function ID associations. | 
| private  java.util.HashMap | m_functionID_customerTable of function name to function ID associations for customized functions | 
| private static java.lang.Class[] | m_functionsThe function table. | 
| private  java.lang.Class[] | m_functions_customerThe function table contains customized functions | 
| private static int | NUM_ALLOWABLE_ADDINSNumber of built-in functions that may be added. | 
| private static int | NUM_BUILT_IN_FUNCSNumber of built in functions. | 
| Constructor Summary | |
|---|---|
| FunctionTable() | |
| Method Summary | |
|---|---|
|  boolean | functionAvailable(java.lang.String methName)Tell if a built-in, non-namespaced function is available. | 
| (package private)  Function | getFunction(int which)Obtain a new Function object from a function ID. | 
| (package private)  java.lang.Object | getFunctionID(java.lang.String key)Obtain a function ID from a given function name | 
| (package private)  java.lang.String | getFunctionName(int funcID)Return the name of the a function in the static table. | 
|  int | installFunction(java.lang.String name,
                               java.lang.Class func)Install a built-in function. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final int FUNC_CURRENT
public static final int FUNC_LAST
public static final int FUNC_POSITION
public static final int FUNC_COUNT
public static final int FUNC_ID
public static final int FUNC_KEY
public static final int FUNC_LOCAL_PART
public static final int FUNC_NAMESPACE
public static final int FUNC_QNAME
public static final int FUNC_GENERATE_ID
public static final int FUNC_NOT
public static final int FUNC_TRUE
public static final int FUNC_FALSE
public static final int FUNC_BOOLEAN
public static final int FUNC_NUMBER
public static final int FUNC_FLOOR
public static final int FUNC_CEILING
public static final int FUNC_ROUND
public static final int FUNC_SUM
public static final int FUNC_STRING
public static final int FUNC_STARTS_WITH
public static final int FUNC_CONTAINS
public static final int FUNC_SUBSTRING_BEFORE
public static final int FUNC_SUBSTRING_AFTER
public static final int FUNC_NORMALIZE_SPACE
public static final int FUNC_TRANSLATE
public static final int FUNC_CONCAT
public static final int FUNC_SUBSTRING
public static final int FUNC_STRING_LENGTH
public static final int FUNC_SYSTEM_PROPERTY
public static final int FUNC_LANG
public static final int FUNC_EXT_FUNCTION_AVAILABLE
public static final int FUNC_EXT_ELEM_AVAILABLE
public static final int FUNC_UNPARSED_ENTITY_URI
public static final int FUNC_DOCLOCATION
private static java.lang.Class[] m_functions
private static java.util.HashMap m_functionID
private java.lang.Class[] m_functions_customer
private java.util.HashMap m_functionID_customer
private static final int NUM_BUILT_IN_FUNCS
private static final int NUM_ALLOWABLE_ADDINS
private int m_funcNextFreeIndex
| Constructor Detail | 
|---|
public FunctionTable()
| Method Detail | 
|---|
java.lang.String getFunctionName(int funcID)
Function getFunction(int which)
               throws javax.xml.transform.TransformerException
which - The function ID, which may correspond to one of the FUNC_XXX 
    values found in FunctionTable, but may 
    be a value installed by an external module.
javax.xml.transform.TransformerException - if ClassNotFoundException, 
    IllegalAccessException, or InstantiationException is thrown.java.lang.Object getFunctionID(java.lang.String key)
key - the function name in a java.lang.String format.
FunctionTable, but may be a 
 value installed by an external module.
public int installFunction(java.lang.String name,
                           java.lang.Class func)
name - The unqualified name of the function, must not be nullfunc - A Implementation of an XPath Function object.
public boolean functionAvailable(java.lang.String methName)
methName - The local name of the function.
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||