|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--net.sf.saxon.expr.ComputedExpression
|
+--net.sf.saxon.expr.FunctionCall
|
+--net.sf.saxon.expr.FunctionProxy
This class acts as a proxy for an extension function defined as a method in a user-defined class
| Field Summary | |
Configuration |
config
|
| Fields inherited from class net.sf.saxon.expr.FunctionCall |
argument |
| Fields inherited from class net.sf.saxon.expr.ComputedExpression |
lineNumber, NO_ARGUMENTS, staticProperties |
| Constructor Summary | |
FunctionProxy()
Constructor: creates an uncommitted FunctionProxy |
|
| Method Summary | |
Expression |
analyze(StaticContext env)
Type-check the function call. |
void |
checkArguments(StaticContext env)
Method called by the expression parser when all arguments have been supplied |
int |
computeCardinality()
Determine the cardinality of the result. |
static Value |
convertJavaObjectToXPath(java.lang.Object result,
Controller controller)
Convert a Java object to an XPath value. |
Item |
evaluateItem(XPathContext context)
Evaluate the function. |
java.lang.reflect.AccessibleObject |
getBestFit(Value[] argValues)
Get the best fit amongst all the candidate methods, constructors, or fields |
static java.lang.Class |
getImplicitJavaClass(java.lang.String uri)
Extract a class name from the URI |
int |
getIntrinsicDependencies()
Determine which aspects of the context the expression depends on. |
ItemType |
getItemType()
Determine the data type of the expression, if possible |
java.lang.String |
getName()
Get the name of the function |
static java.lang.Class |
getVendorExtensionClass(java.lang.String uri)
Get a class corresponding to a known extension function URI |
SequenceIterator |
iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence. |
Expression |
preEvaluate(StaticContext env)
preEvaluate: this method suppresses compile-time evaluation by doing nothing (because the external function might have side-effects and might use the context) |
void |
setConfiguration(Configuration config)
Set the configuration |
boolean |
setFunctionName(java.lang.Class reqClass,
java.lang.String localName,
int numArgs)
setFunctionName: locates the external class and the method (or candidate methods) to which this function relates. |
| Methods inherited from class net.sf.saxon.expr.FunctionCall |
checkArgumentCount, display, getNumberOfArguments, getSubExpressions, promote, setArguments, simplify, simplifyArguments |
| Methods inherited from class net.sf.saxon.expr.ComputedExpression |
computeDependencies, computeSpecialProperties, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluateAsString, getCardinality, getDependencies, getLineNumber, getSourceLocator, getSpecialProperties, markTailFunctionCalls, setLineNumber, typeError |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public Configuration config
| Constructor Detail |
public FunctionProxy()
| Method Detail |
public void setConfiguration(Configuration config)
public boolean setFunctionName(java.lang.Class reqClass,
java.lang.String localName,
int numArgs)
The method is also used while calling function-available(). In this case the number of arguments is not known (it will be set to zero). We return true if a match was found, regardless of the number of arguments.
reqClass - The Java class namelocalName - The local name used in the XPath function callnumArgs - The number of arguments in the function call. -1 indicates unknown;
this is used during a call on function-available() with no second argument
public Expression preEvaluate(StaticContext env)
preEvaluate in class FunctionCall
public void checkArguments(StaticContext env)
throws XPathException
checkArguments in class FunctionCallXPathExceptionpublic ItemType getItemType()
public int computeCardinality()
computeCardinality in class ComputedExpressionpublic java.lang.String getName()
getName in class FunctionCall
public Expression analyze(StaticContext env)
throws XPathException
analyze in interface Expressionanalyze in class FunctionCallenv - the static context of the expression
XPathExceptionpublic int getIntrinsicDependencies()
getIntrinsicDependencies in class ComputedExpression
public java.lang.reflect.AccessibleObject getBestFit(Value[] argValues)
throws XPathException
XPathException
public Item evaluateItem(XPathContext context)
throws XPathException
evaluateItem in interface ExpressionevaluateItem in class ComputedExpressioncontext - The context in which the function is to be evaluated
XPathException - if the function cannot be evaluated.
public SequenceIterator iterate(XPathContext context)
throws XPathException
ComputedExpression
iterate in interface Expressioniterate in class ComputedExpressioncontext - supplies the context for evaluation
XPathException - if any dynamic error occurs evaluating the
expressionpublic static java.lang.Class getVendorExtensionClass(java.lang.String uri)
public static java.lang.Class getImplicitJavaClass(java.lang.String uri)
public static Value convertJavaObjectToXPath(java.lang.Object result,
Controller controller)
throws XPathException
result - The Java object to be convertedcontroller - The controller: may be null, in which case a Source object cannot be
supplied
XPathException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||