Methods Summary |
---|
public void | callArgVisitors(com.sun.org.apache.xpath.internal.XPathVisitor visitor)Call the visitors for the function arguments.
|
public void | callVisitors(com.sun.org.apache.xpath.internal.ExpressionOwner owner, com.sun.org.apache.xpath.internal.XPathVisitor visitor)
if(visitor.visitFunction(owner, this))
{
callArgVisitors(visitor);
}
|
public void | checkNumberArgs(int argNum)Check that the number of arguments passed to this function is correct.
This method is meant to be overloaded by derived classes, to check for
the number of arguments for a specific function type. This method is
called by the compiler for static number of arguments checking.
if (argNum != 0)
reportWrongNumberArgs();
|
public boolean | deepEquals(com.sun.org.apache.xpath.internal.Expression expr)
if(!isSameClass(expr))
return false;
return true;
|
public com.sun.org.apache.xpath.internal.objects.XObject | execute(com.sun.org.apache.xpath.internal.XPathContext xctxt)Execute an XPath function object. The function must return
a valid object.
// Programmer's assert. (And, no, I don't want the method to be abstract).
System.out.println("Error! Function.execute should not be called!");
return null;
|
public void | postCompileStep(com.sun.org.apache.xpath.internal.compiler.Compiler compiler)This function is currently only being used by Position()
and Last(). See respective functions for more detail.
// no default action
|
protected void | reportWrongNumberArgs()Constructs and throws a WrongNumberArgException with the appropriate
message for this function object. This method is meant to be overloaded
by derived classes so that the message will be as specific as possible.
throw new WrongNumberArgsException(XSLMessages.createXPATHMessage("zero", null));
|
public void | setArg(com.sun.org.apache.xpath.internal.Expression arg, int argNum)Set an argument expression for a function. This method is called by the
XPath compiler.
// throw new WrongNumberArgsException(XSLMessages.createXPATHMessage("zero", null));
reportWrongNumberArgs();
|