Package org.apache.xpath.compiler
Class FunctionTable
java.lang.Object
org.apache.xpath.compiler.FunctionTable
public class FunctionTable extends Object
The function table for XPath.
-
Field Summary
Fields Modifier and Type Field Description static intFUNC_BOOLEANThe 'boolean()' id.static intFUNC_CEILINGThe 'ceiling()' id.static intFUNC_CONCATThe 'concat()' id.static intFUNC_CONTAINSThe 'contains()' id.static intFUNC_COUNTThe 'count()' id.static intFUNC_CURRENTThe 'current()' id.static intFUNC_DOCLOCATIONThe 'document-location()' id (Proprietary).static intFUNC_EXT_ELEM_AVAILABLEThe 'element-available()' id (XSLT).static intFUNC_EXT_FUNCTION_AVAILABLEThe 'function-available()' id (XSLT).static intFUNC_FALSEThe 'false()' id.static intFUNC_FLOORThe 'floor()' id.static intFUNC_GENERATE_IDThe 'generate-id()' id.static intFUNC_IDThe 'id()' id.static intFUNC_KEYThe 'key()' id (XSLT).static intFUNC_LANGThe 'lang()' id.static intFUNC_LASTThe 'last()' id.static intFUNC_LOCAL_PARTThe 'local-name()' id.static intFUNC_NAMESPACEThe 'namespace-uri()' id.static intFUNC_NORMALIZE_SPACEThe 'normalize-space()' id.static intFUNC_NOTThe 'not()' id.static intFUNC_NUMBERThe 'number()' id.static intFUNC_POSITIONThe 'position()' id.static intFUNC_QNAMEThe 'name()' id.static intFUNC_ROUNDThe 'round()' id.static intFUNC_STARTS_WITHThe 'starts-with()' id.static intFUNC_STRINGThe 'string()' id.static intFUNC_STRING_LENGTHThe 'string-length()' id.static intFUNC_SUBSTRINGThe 'substring()' id.static intFUNC_SUBSTRING_AFTERThe 'substring-after()' id.static intFUNC_SUBSTRING_BEFOREThe 'substring-before()' id.static intFUNC_SUMThe 'sum()' id.static intFUNC_SYSTEM_PROPERTYThe 'system-property()' id.static intFUNC_TRANSLATEThe 'translate()' id.static intFUNC_TRUEThe 'true()' id.static intFUNC_UNPARSED_ENTITY_URIThe 'unparsed-entity-uri()' id (XSLT). -
Constructor Summary
Constructors Constructor Description FunctionTable() -
Method Summary
Modifier and Type Method Description booleanfunctionAvailable(String methName)Tell if a built-in, non-namespaced function is available.intinstallFunction(String name, Class func)Install a built-in function.
-
Field Details
-
FUNC_CURRENT
public static final int FUNC_CURRENTThe 'current()' id.- See Also:
- Constant Field Values
-
FUNC_LAST
public static final int FUNC_LASTThe 'last()' id.- See Also:
- Constant Field Values
-
FUNC_POSITION
public static final int FUNC_POSITIONThe 'position()' id.- See Also:
- Constant Field Values
-
FUNC_COUNT
public static final int FUNC_COUNTThe 'count()' id.- See Also:
- Constant Field Values
-
FUNC_ID
public static final int FUNC_IDThe 'id()' id.- See Also:
- Constant Field Values
-
FUNC_KEY
public static final int FUNC_KEYThe 'key()' id (XSLT).- See Also:
- Constant Field Values
-
FUNC_LOCAL_PART
public static final int FUNC_LOCAL_PARTThe 'local-name()' id.- See Also:
- Constant Field Values
-
FUNC_NAMESPACE
public static final int FUNC_NAMESPACEThe 'namespace-uri()' id.- See Also:
- Constant Field Values
-
FUNC_QNAME
public static final int FUNC_QNAMEThe 'name()' id.- See Also:
- Constant Field Values
-
FUNC_GENERATE_ID
public static final int FUNC_GENERATE_IDThe 'generate-id()' id.- See Also:
- Constant Field Values
-
FUNC_NOT
public static final int FUNC_NOTThe 'not()' id.- See Also:
- Constant Field Values
-
FUNC_TRUE
public static final int FUNC_TRUEThe 'true()' id.- See Also:
- Constant Field Values
-
FUNC_FALSE
public static final int FUNC_FALSEThe 'false()' id.- See Also:
- Constant Field Values
-
FUNC_BOOLEAN
public static final int FUNC_BOOLEANThe 'boolean()' id.- See Also:
- Constant Field Values
-
FUNC_NUMBER
public static final int FUNC_NUMBERThe 'number()' id.- See Also:
- Constant Field Values
-
FUNC_FLOOR
public static final int FUNC_FLOORThe 'floor()' id.- See Also:
- Constant Field Values
-
FUNC_CEILING
public static final int FUNC_CEILINGThe 'ceiling()' id.- See Also:
- Constant Field Values
-
FUNC_ROUND
public static final int FUNC_ROUNDThe 'round()' id.- See Also:
- Constant Field Values
-
FUNC_SUM
public static final int FUNC_SUMThe 'sum()' id.- See Also:
- Constant Field Values
-
FUNC_STRING
public static final int FUNC_STRINGThe 'string()' id.- See Also:
- Constant Field Values
-
FUNC_STARTS_WITH
public static final int FUNC_STARTS_WITHThe 'starts-with()' id.- See Also:
- Constant Field Values
-
FUNC_CONTAINS
public static final int FUNC_CONTAINSThe 'contains()' id.- See Also:
- Constant Field Values
-
FUNC_SUBSTRING_BEFORE
public static final int FUNC_SUBSTRING_BEFOREThe 'substring-before()' id.- See Also:
- Constant Field Values
-
FUNC_SUBSTRING_AFTER
public static final int FUNC_SUBSTRING_AFTERThe 'substring-after()' id.- See Also:
- Constant Field Values
-
FUNC_NORMALIZE_SPACE
public static final int FUNC_NORMALIZE_SPACEThe 'normalize-space()' id.- See Also:
- Constant Field Values
-
FUNC_TRANSLATE
public static final int FUNC_TRANSLATEThe 'translate()' id.- See Also:
- Constant Field Values
-
FUNC_CONCAT
public static final int FUNC_CONCATThe 'concat()' id.- See Also:
- Constant Field Values
-
FUNC_SUBSTRING
public static final int FUNC_SUBSTRINGThe 'substring()' id.- See Also:
- Constant Field Values
-
FUNC_STRING_LENGTH
public static final int FUNC_STRING_LENGTHThe 'string-length()' id.- See Also:
- Constant Field Values
-
FUNC_SYSTEM_PROPERTY
public static final int FUNC_SYSTEM_PROPERTYThe 'system-property()' id.- See Also:
- Constant Field Values
-
FUNC_LANG
public static final int FUNC_LANGThe 'lang()' id.- See Also:
- Constant Field Values
-
FUNC_EXT_FUNCTION_AVAILABLE
public static final int FUNC_EXT_FUNCTION_AVAILABLEThe 'function-available()' id (XSLT).- See Also:
- Constant Field Values
-
FUNC_EXT_ELEM_AVAILABLE
public static final int FUNC_EXT_ELEM_AVAILABLEThe 'element-available()' id (XSLT).- See Also:
- Constant Field Values
-
FUNC_UNPARSED_ENTITY_URI
public static final int FUNC_UNPARSED_ENTITY_URIThe 'unparsed-entity-uri()' id (XSLT).- See Also:
- Constant Field Values
-
FUNC_DOCLOCATION
public static final int FUNC_DOCLOCATIONThe 'document-location()' id (Proprietary).- See Also:
- Constant Field Values
-
-
Constructor Details
-
FunctionTable
public FunctionTable()
-
-
Method Details
-
installFunction
Install a built-in function.- Parameters:
name- The unqualified name of the function, must not be nullfunc- A Implementation of an XPath Function object.- Returns:
- the position of the function in the internal index.
-
functionAvailable
Tell if a built-in, non-namespaced function is available.- Parameters:
methName- The local name of the function.- Returns:
- True if the function can be executed.
-