org.exolab.adaptx.xpath.functions
Class FunctionCallImpl

java.lang.Object
  extended by org.exolab.adaptx.xpath.expressions.PrimaryExpr
      extended by org.exolab.adaptx.xpath.expressions.FunctionCall
          extended by org.exolab.adaptx.xpath.functions.FunctionCallImpl
All Implemented Interfaces:
Parameters, XPathExpression
Direct Known Subclasses:
BooleanFunctionCall, Concat, Contains, CountFunctionCall, ErrorFunctionCall, ExtensionFunctionCall, FalseFunctionCall, FormatNumber, IdFunctionCall, IdRefFunctionCall, LangFunctionCall, LastFunctionCall, Normalize, NotFunctionCall, NumberFunctionCall, PositionFunctionCall, StartsWith, StringFunctionCall, StringLength, Substring, SubstringAfter, SubstringBefore, SumFunctionCall, TextFunctionCall, Translate, TrueFunctionCall, XMLNamesFunctionCall

public abstract class FunctionCallImpl
extends FunctionCall
implements Parameters

An abstract class representing an XPath function call

Version:
$Revision: 3878 $
Author:
Keith Visco

Field Summary
static java.lang.String INVALID_NUMBER_PARAMS
           
static java.lang.String INVALID_RESULT
           
 
Fields inherited from class org.exolab.adaptx.xpath.expressions.PrimaryExpr
EXPR, FUNCTION_CALL, LITERAL, NUMBER, VARIABLE_REFERENCE
 
Fields inherited from interface org.exolab.adaptx.xpath.XPathExpression
BOOLEAN, ERROR, FILTER_EXPR, LOCATION_PATH, NODE_TEST, PATH_EXPR, PRIMARY, STEP, STRING, UNION_EXPR
 
Constructor Summary
FunctionCallImpl(java.lang.String name)
           
 
Method Summary
 void addParameter(XPathExpression expr)
          Adds the specified Expr to the list
 java.lang.String getFunctionName()
          Returns the name of this function call
 XPathExpression getParameter(int index)
          Returns the Expr at the specified position in this list.
 int getParameterCount()
          Returns the number of expressions in the List
 java.lang.String toString()
          Returns the String representation of this FunctionCall
 
Methods inherited from class org.exolab.adaptx.xpath.expressions.PrimaryExpr
getExprType, getType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.exolab.adaptx.xpath.XPathExpression
evaluate
 

Field Detail

INVALID_NUMBER_PARAMS

public static final java.lang.String INVALID_NUMBER_PARAMS
See Also:
Constant Field Values

INVALID_RESULT

public static final java.lang.String INVALID_RESULT
See Also:
Constant Field Values
Constructor Detail

FunctionCallImpl

public FunctionCallImpl(java.lang.String name)
Method Detail

getFunctionName

public java.lang.String getFunctionName()
Returns the name of this function call

Specified by:
getFunctionName in class FunctionCall
Returns:
the name of this function call

toString

public java.lang.String toString()
Returns the String representation of this FunctionCall

Specified by:
toString in interface XPathExpression
Overrides:
toString in class java.lang.Object
Returns:
the String representation of this FunctionCall

addParameter

public final void addParameter(XPathExpression expr)
                        throws XPathException
Adds the specified Expr to the list

Parameters:
expr - the Expr to add to the list
Throws:
XPathException

getParameter

public final XPathExpression getParameter(int index)
                                   throws java.lang.IndexOutOfBoundsException
Returns the Expr at the specified position in this list.

Specified by:
getParameter in interface Parameters
Specified by:
getParameter in class FunctionCall
Parameters:
index - the position of the Expr to return
Throws:
java.lang.IndexOutOfBoundsException

getParameterCount

public final int getParameterCount()
Returns the number of expressions in the List

Specified by:
getParameterCount in interface Parameters
Specified by:
getParameterCount in class FunctionCall
Returns:
the number of expressions in the List