Package org.apache.fop.fo.expr
Interface Function
- All Known Implementing Classes:
AbsFunction
,BodyStartFunction
,FromNearestSpecifiedValueFunction
,FromParentFunction
,FromTableColumnFunction
,FunctionBase
,InheritedPropFunction
,LabelEndFunction
,MaxFunction
,MinFunction
,OCAColorFunction
,ProportionalColumnWidthFunction
public interface Function
Interface for managing XSL-FO Functions
-
Method Summary
Modifier and TypeMethodDescriptioneval
(Property[] args, PropertyInfo pi) Evaluate the functiongetOptionalArgDefault
(int index, PropertyInfo pi) int
int
boolean
Determine if function allows variable arguments.
-
Method Details
-
getRequiredArgsCount
int getRequiredArgsCount()- Returns:
- the number of required (non-optional) arguments that must be specified in the argument list
-
getOptionalArgsCount
int getOptionalArgsCount()- 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
- 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
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.- Returns:
- true if function permits additional variable number of arguments after required and (completely specified) optional arguments
-
getPercentBase
PercentBase getPercentBase()- Returns:
- the basis for percentage calculations
-
eval
Evaluate the function- Parameters:
args
- an array of Properties that should be evaluatedpi
- property information instance that applies to property being evaluated- Returns:
- the Property satisfying the function
- Throws:
PropertyException
- for problems when evaluating the function
-