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
Abstract Base class for XSL-FO functions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetOptionalArgDefault
(int index, PropertyInfo pi) int
protected final Property
boolean
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
-
Constructor Details
-
FunctionBase
public FunctionBase()
-
-
Method Details
-
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
- 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
- Specified by:
getPercentBase
in interfaceFunction
- Returns:
- the basis for percentage calculations
-
getPropertyName
- Parameters:
pi
- property information instance that applies to property being evaluated- Returns:
- string property whose value is name of property being evaluated
-