Package org.apache.fop.fo.expr
Class FunctionBase
- java.lang.Object
-
- org.apache.fop.fo.expr.FunctionBase
-
- All Implemented Interfaces:
Function
- Direct Known Subclasses:
AbsFunction
,BodyStartFunction
,FromNearestSpecifiedValueFunction
,FromParentFunction
,FromTableColumnFunction
,InheritedPropFunction
,LabelEndFunction
,MaxFunction
,MinFunction
,OCAColorFunction
,ProportionalColumnWidthFunction
public abstract class FunctionBase extends java.lang.Object implements Function
Abstract Base class for XSL-FO functions
-
-
Constructor Summary
Constructors Constructor Description FunctionBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Property
getOptionalArgDefault(int index, PropertyInfo pi)
int
getOptionalArgsCount()
PercentBase
getPercentBase()
protected Property
getPropertyName(PropertyInfo pi)
boolean
hasVariableArgs()
Determine if function allows variable arguments.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.fop.fo.expr.Function
eval, getRequiredArgsCount
-
-
-
-
Method Detail
-
getOptionalArgsCount
public int getOptionalArgsCount()
- Specified by:
getOptionalArgsCount
in interfaceFunction
- Returns:
- the number of non-required (optional) arguments that may be specified in the argument list, which, if specified, must follow the required arguments
-
getOptionalArgDefault
public Property getOptionalArgDefault(int index, PropertyInfo pi) throws PropertyException
- Specified by:
getOptionalArgDefault
in interfaceFunction
- Parameters:
index
- of optional argumentpi
- property information instance that applies to property being evaluated- Returns:
- the default property value for the optional argument at INDEX, where INDEX is with respect to optional arguments; i.e., the first optional argument position is index 0; if no default for a given index, then null is returned
- Throws:
PropertyException
- if index is greater than or equal to optional args count
-
hasVariableArgs
public boolean hasVariableArgs()
Determine if function allows variable arguments. If it does, then they must appear after required and optional arguments, and all optional arguments must be specified.- Specified by:
hasVariableArgs
in interfaceFunction
- Returns:
- true if function permits additional variable number of arguments after required and (completely specified) optional arguments
-
getPercentBase
public PercentBase getPercentBase()
- Specified by:
getPercentBase
in interfaceFunction
- Returns:
- the basis for percentage calculations
-
getPropertyName
protected final Property getPropertyName(PropertyInfo pi)
- Parameters:
pi
- property information instance that applies to property being evaluated- Returns:
- string property whose value is name of property being evaluated
-
-