org.apache.commons.jxpath.ri.compiler

Class CoreFunction


public class CoreFunction
extends Operation

An element of the compile tree representing one of built-in functions like "position()" or "number()".
Version:
$Revision: 1.16 $ $Date: 2004/04/01 02:53:45 $
Author:
Dmitri Plotnikov

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.commons.jxpath.ri.compiler.Expression

Expression.PointerIterator, Expression.ValueIterator

Field Summary

Fields inherited from class org.apache.commons.jxpath.ri.compiler.Operation

args

Fields inherited from class org.apache.commons.jxpath.ri.compiler.Expression

NOT_A_NUMBER, ONE, ZERO

Constructor Summary

CoreFunction(int functionCode, args[] )

Method Summary

Object
compute(EvalContext context)
boolean
computeContextDependent()
Returns true if any argument is context dependent or if the function is last(), position(), boolean(), local-name(), name(), string(), lang(), number().
Object
computeValue(EvalContext context)
Computes a built-in function
protected Object
functionBoolean(EvalContext context)
protected Object
functionCeiling(EvalContext context)
protected Object
functionConcat(EvalContext context)
protected Object
functionContains(EvalContext context)
protected Object
functionCount(EvalContext context)
protected Object
functionFalse(EvalContext context)
protected Object
functionFloor(EvalContext context)
protected Object
functionID(EvalContext context)
protected Object
functionKey(EvalContext context)
protected Object
functionLang(EvalContext context)
protected Object
functionLast(EvalContext context)
protected Object
functionLocalName(EvalContext context)
protected Object
functionName(EvalContext context)
protected Object
functionNamespaceURI(EvalContext context)
protected Object
functionNormalizeSpace(EvalContext context)
protected Object
functionNot(EvalContext context)
protected Object
functionNull(EvalContext context)
protected Object
functionNumber(EvalContext context)
protected Object
functionPosition(EvalContext context)
protected Object
functionRound(EvalContext context)
protected Object
functionStartsWith(EvalContext context)
protected Object
functionString(EvalContext context)
protected Object
functionStringLength(EvalContext context)
protected Object
functionSubstring(EvalContext context)
protected Object
functionSubstringAfter(EvalContext context)
protected Object
functionSubstringBefore(EvalContext context)
protected Object
functionSum(EvalContext context)
protected Object
functionTranslate(EvalContext context)
protected Object
functionTrue(EvalContext context)
Expression
getArg1()
Expression
getArg2()
Expression
getArg3()
int
getArgumentCount()
int
getFunctionCode()
protected String
getFunctionName()
String
toString()

Methods inherited from class org.apache.commons.jxpath.ri.compiler.Operation

computeContextDependent, getArguments

Methods inherited from class org.apache.commons.jxpath.ri.compiler.Expression

compute, computeContextDependent, computeValue, isContextDependent, iterate, iteratePointers

Constructor Details

CoreFunction

public CoreFunction(int functionCode,
                    args[] )

Method Details

compute

public Object compute(EvalContext context)
Overrides:
compute in interface Expression

computeContextDependent

public boolean computeContextDependent()
Returns true if any argument is context dependent or if the function is last(), position(), boolean(), local-name(), name(), string(), lang(), number().
Overrides:
computeContextDependent in interface Operation

computeValue

public Object computeValue(EvalContext context)
Computes a built-in function
Overrides:
computeValue in interface Expression

functionBoolean

protected Object functionBoolean(EvalContext context)

functionCeiling

protected Object functionCeiling(EvalContext context)

functionConcat

protected Object functionConcat(EvalContext context)

functionContains

protected Object functionContains(EvalContext context)

functionCount

protected Object functionCount(EvalContext context)

functionFalse

protected Object functionFalse(EvalContext context)

functionFloor

protected Object functionFloor(EvalContext context)

functionID

protected Object functionID(EvalContext context)

functionKey

protected Object functionKey(EvalContext context)

functionLang

protected Object functionLang(EvalContext context)

functionLast

protected Object functionLast(EvalContext context)

functionLocalName

protected Object functionLocalName(EvalContext context)

functionName

protected Object functionName(EvalContext context)

functionNamespaceURI

protected Object functionNamespaceURI(EvalContext context)

functionNormalizeSpace

protected Object functionNormalizeSpace(EvalContext context)

functionNot

protected Object functionNot(EvalContext context)

functionNull

protected Object functionNull(EvalContext context)

functionNumber

protected Object functionNumber(EvalContext context)

functionPosition

protected Object functionPosition(EvalContext context)

functionRound

protected Object functionRound(EvalContext context)

functionStartsWith

protected Object functionStartsWith(EvalContext context)

functionString

protected Object functionString(EvalContext context)

functionStringLength

protected Object functionStringLength(EvalContext context)

functionSubstring

protected Object functionSubstring(EvalContext context)

functionSubstringAfter

protected Object functionSubstringAfter(EvalContext context)

functionSubstringBefore

protected Object functionSubstringBefore(EvalContext context)

functionSum

protected Object functionSum(EvalContext context)

functionTranslate

protected Object functionTranslate(EvalContext context)

functionTrue

protected Object functionTrue(EvalContext context)

getArg1

public Expression getArg1()

getArg2

public Expression getArg2()

getArg3

public Expression getArg3()

getArgumentCount

public int getArgumentCount()

getFunctionCode

public int getFunctionCode()

getFunctionName

protected String getFunctionName()

toString

public String toString()