Methods Summary |
---|
public void | callArgVisitors(com.sun.org.apache.xpath.internal.XPathVisitor visitor)
super.callArgVisitors(visitor);
if (null != m_args)
{
int n = m_args.length;
for (int i = 0; i < n; i++)
{
m_args[i].callVisitors(new ArgMultiOwner(i), visitor);
}
}
|
public boolean | canTraverseOutsideSubtree()Tell if this expression or it's subexpressions can traverse outside
the current subtree.
if (super.canTraverseOutsideSubtree())
return true;
else
{
int n = m_args.length;
for (int i = 0; i < n; i++)
{
if (m_args[i].canTraverseOutsideSubtree())
return true;
}
return false;
}
|
public void | checkNumberArgs(int argNum)Check that the number of arguments passed to this function is correct.
|
public boolean | deepEquals(com.sun.org.apache.xpath.internal.Expression expr)
if (!super.deepEquals(expr))
return false;
FunctionMultiArgs fma = (FunctionMultiArgs) expr;
if (null != m_args)
{
int n = m_args.length;
if ((null == fma) || (fma.m_args.length != n))
return false;
for (int i = 0; i < n; i++)
{
if (!m_args[i].deepEquals(fma.m_args[i]))
return false;
}
}
else if (null != fma.m_args)
{
return false;
}
return true;
|
public void | fixupVariables(java.util.Vector vars, int globalsSize)This function is used to fixup variables from QNames to stack frame
indexes at stylesheet build time.
super.fixupVariables(vars, globalsSize);
if(null != m_args)
{
for (int i = 0; i < m_args.length; i++)
{
m_args[i].fixupVariables(vars, globalsSize);
}
}
|
public com.sun.org.apache.xpath.internal.Expression[] | getArgs()Return an expression array containing arguments at index 3 or greater.
return m_args;
|
protected void | reportWrongNumberArgs()Constructs and throws a WrongNumberArgException with the appropriate
message for this function object. This class supports an arbitrary
number of arguments, so this method must never be called.
String fMsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_INCORRECT_PROGRAMMER_ASSERTION,
new Object[]{ "Programmer's assertion: the method FunctionMultiArgs.reportWrongNumberArgs() should never be called." });
throw new RuntimeException(fMsg);
|
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.
if (argNum < 3)
super.setArg(arg, argNum);
else
{
if (null == m_args)
{
m_args = new Expression[1];
m_args[0] = arg;
}
else
{
// Slow but space conservative.
Expression[] args = new Expression[m_args.length + 1];
System.arraycopy(m_args, 0, args, 0, m_args.length);
args[m_args.length] = arg;
m_args = args;
}
arg.exprSetParent(this);
}
|