Package org.apache.xpath.compiler
Class FunctionTable
- java.lang.Object
-
- org.apache.xpath.compiler.FunctionTable
-
public class FunctionTable extends java.lang.ObjectThe 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanfunctionAvailable(java.lang.String methName)Tell if a built-in, non-namespaced function is available.intinstallFunction(java.lang.String name, java.lang.Class func)Install a built-in function.
-
-
-
Field Detail
-
FUNC_CURRENT
public static final int FUNC_CURRENT
The 'current()' id.- See Also:
- Constant Field Values
-
FUNC_LAST
public static final int FUNC_LAST
The 'last()' id.- See Also:
- Constant Field Values
-
FUNC_POSITION
public static final int FUNC_POSITION
The 'position()' id.- See Also:
- Constant Field Values
-
FUNC_COUNT
public static final int FUNC_COUNT
The 'count()' id.- See Also:
- Constant Field Values
-
FUNC_ID
public static final int FUNC_ID
The 'id()' id.- See Also:
- Constant Field Values
-
FUNC_KEY
public static final int FUNC_KEY
The 'key()' id (XSLT).- See Also:
- Constant Field Values
-
FUNC_LOCAL_PART
public static final int FUNC_LOCAL_PART
The 'local-name()' id.- See Also:
- Constant Field Values
-
FUNC_NAMESPACE
public static final int FUNC_NAMESPACE
The 'namespace-uri()' id.- See Also:
- Constant Field Values
-
FUNC_QNAME
public static final int FUNC_QNAME
The 'name()' id.- See Also:
- Constant Field Values
-
FUNC_GENERATE_ID
public static final int FUNC_GENERATE_ID
The 'generate-id()' id.- See Also:
- Constant Field Values
-
FUNC_NOT
public static final int FUNC_NOT
The 'not()' id.- See Also:
- Constant Field Values
-
FUNC_TRUE
public static final int FUNC_TRUE
The 'true()' id.- See Also:
- Constant Field Values
-
FUNC_FALSE
public static final int FUNC_FALSE
The 'false()' id.- See Also:
- Constant Field Values
-
FUNC_BOOLEAN
public static final int FUNC_BOOLEAN
The 'boolean()' id.- See Also:
- Constant Field Values
-
FUNC_NUMBER
public static final int FUNC_NUMBER
The 'number()' id.- See Also:
- Constant Field Values
-
FUNC_FLOOR
public static final int FUNC_FLOOR
The 'floor()' id.- See Also:
- Constant Field Values
-
FUNC_CEILING
public static final int FUNC_CEILING
The 'ceiling()' id.- See Also:
- Constant Field Values
-
FUNC_ROUND
public static final int FUNC_ROUND
The 'round()' id.- See Also:
- Constant Field Values
-
FUNC_SUM
public static final int FUNC_SUM
The 'sum()' id.- See Also:
- Constant Field Values
-
FUNC_STRING
public static final int FUNC_STRING
The 'string()' id.- See Also:
- Constant Field Values
-
FUNC_STARTS_WITH
public static final int FUNC_STARTS_WITH
The 'starts-with()' id.- See Also:
- Constant Field Values
-
FUNC_CONTAINS
public static final int FUNC_CONTAINS
The 'contains()' id.- See Also:
- Constant Field Values
-
FUNC_SUBSTRING_BEFORE
public static final int FUNC_SUBSTRING_BEFORE
The 'substring-before()' id.- See Also:
- Constant Field Values
-
FUNC_SUBSTRING_AFTER
public static final int FUNC_SUBSTRING_AFTER
The 'substring-after()' id.- See Also:
- Constant Field Values
-
FUNC_NORMALIZE_SPACE
public static final int FUNC_NORMALIZE_SPACE
The 'normalize-space()' id.- See Also:
- Constant Field Values
-
FUNC_TRANSLATE
public static final int FUNC_TRANSLATE
The 'translate()' id.- See Also:
- Constant Field Values
-
FUNC_CONCAT
public static final int FUNC_CONCAT
The 'concat()' id.- See Also:
- Constant Field Values
-
FUNC_SUBSTRING
public static final int FUNC_SUBSTRING
The 'substring()' id.- See Also:
- Constant Field Values
-
FUNC_STRING_LENGTH
public static final int FUNC_STRING_LENGTH
The 'string-length()' id.- See Also:
- Constant Field Values
-
FUNC_SYSTEM_PROPERTY
public static final int FUNC_SYSTEM_PROPERTY
The 'system-property()' id.- See Also:
- Constant Field Values
-
FUNC_LANG
public static final int FUNC_LANG
The 'lang()' id.- See Also:
- Constant Field Values
-
FUNC_EXT_FUNCTION_AVAILABLE
public static final int FUNC_EXT_FUNCTION_AVAILABLE
The 'function-available()' id (XSLT).- See Also:
- Constant Field Values
-
FUNC_EXT_ELEM_AVAILABLE
public static final int FUNC_EXT_ELEM_AVAILABLE
The 'element-available()' id (XSLT).- See Also:
- Constant Field Values
-
FUNC_UNPARSED_ENTITY_URI
public static final int FUNC_UNPARSED_ENTITY_URI
The 'unparsed-entity-uri()' id (XSLT).- See Also:
- Constant Field Values
-
FUNC_DOCLOCATION
public static final int FUNC_DOCLOCATION
The 'document-location()' id (Proprietary).- See Also:
- Constant Field Values
-
-
Method Detail
-
installFunction
public int installFunction(java.lang.String name, java.lang.Class func)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
public boolean functionAvailable(java.lang.String methName)
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.
-
-