Package org.apache.fop.fo.expr
Class FromParentFunction
java.lang.Object
org.apache.fop.fo.expr.FunctionBase
org.apache.fop.fo.expr.FromParentFunction
- All Implemented Interfaces:
Function
Class modelling the from-parent Property Value function. See Sec. 5.10.4 of
the XSL-FO spec.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioneval
(Property[] args, PropertyInfo pInfo) Evaluate the functiongetOptionalArgDefault
(int index, PropertyInfo pi) int
int
Methods inherited from class org.apache.fop.fo.expr.FunctionBase
getPercentBase, getPropertyName, hasVariableArgs
-
Constructor Details
-
FromParentFunction
public FromParentFunction()
-
-
Method Details
-
getRequiredArgsCount
public int getRequiredArgsCount()- Returns:
- the number of required (non-optional) arguments that must be specified in the argument list
-
getOptionalArgsCount
public int getOptionalArgsCount()Description copied from class:FunctionBase
- Specified by:
getOptionalArgsCount
in interfaceFunction
- Overrides:
getOptionalArgsCount
in classFunctionBase
- 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
Description copied from class:FunctionBase
- Specified by:
getOptionalArgDefault
in interfaceFunction
- Overrides:
getOptionalArgDefault
in classFunctionBase
- 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
-
eval
Evaluate the function- Parameters:
args
- an array of Properties that should be evaluatedpInfo
- property information instance that applies to property being evaluated- Returns:
- the Property satisfying the function
- Throws:
PropertyException
- for problems when evaluating the function
-