Package net.sf.saxon.functions
Class StandardFunction
- java.lang.Object
-
- net.sf.saxon.functions.StandardFunction
-
public abstract class StandardFunction extends java.lang.ObjectThis class contains static data tables defining the properties of standard functions. "Standard functions" here means the XPath 2.0 functions, the XSLT 2.0 functions, and a few selected extension functions which need special recognition.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStandardFunction.EntryAn entry in the table describing the properties of a function
-
Field Summary
Fields Modifier and Type Field Description protected static ItemTypeSAME_AS_FIRST_ARGUMENT
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidarg(StandardFunction.Entry e, int a, ItemType type, int cardinality)Add information to a function entry about the argument types of the functionstatic StandardFunction.EntrygetFunction(java.lang.String name, int arity)Get the table entry for the function with a given namestatic StandardFunction.EntrymakeEntry(java.lang.String name, java.lang.Class implementationClass, int opcode, int minArguments, int maxArguments, ItemType itemType, int cardinality)Make a table entry describing the signature of a function, with a reference to the implementation class.
-
-
-
Field Detail
-
SAME_AS_FIRST_ARGUMENT
protected static ItemType SAME_AS_FIRST_ARGUMENT
-
-
Method Detail
-
makeEntry
public static StandardFunction.Entry makeEntry(java.lang.String name, java.lang.Class implementationClass, int opcode, int minArguments, int maxArguments, ItemType itemType, int cardinality)
Make a table entry describing the signature of a function, with a reference to the implementation class.- Parameters:
name- the function nameimplementationClass- the class used to implement the functionopcode- identifies the function when a single class implements several functionsminArguments- the minimum number of arguments requiredmaxArguments- the maximum number of arguments alloweditemType- the item type of the result of the functioncardinality- the cardinality of the result of the function- Returns:
- the entry describing the function. The entry is incomplete, it does not yet contain information about the function arguments.
-
arg
public static void arg(StandardFunction.Entry e, int a, ItemType type, int cardinality)
Add information to a function entry about the argument types of the function- Parameters:
e- the entry for the functiona- the position of the argument, counting from zerotype- the item type of the argumentcardinality- the cardinality of the argument
-
getFunction
public static StandardFunction.Entry getFunction(java.lang.String name, int arity)
Get the table entry for the function with a given name- Parameters:
name- the name of the function. This may be an unprefixed local-name for functions in the system namespace, or may use the conventional prefix "saxon:" in the case of Saxon extension functions that are specially recognized- Returns:
- if the function name is known, an Entry containing information about the function. Otherwise, null
-
-