public class ASTFunNodeConverter extends AbstractJepConversionFunction<ASTFunNode>
Constructor and Description |
---|
ASTFunNodeConverter() |
Modifier and Type | Method and Description |
---|---|
private JepConversionFunction |
getConverter(org.nfunk.jep.function.PostfixMathCommandI function,
Operator operator)
Get a converter by first checking the if one exists for the given function,
and then for the given operator symbol.
|
Expression |
toExpression(ASTFunNode node)
Get the
PostfixMathCommandI object from the function node
and delegate conversion to JepExpressionFunction if that interface
is implemented. |
Restriction |
toRestriction(ASTFunNode node)
Get the
PostfixMathCommandI object from the function node
and delegate conversion to JepRestrictionFunction if that interface
is implemented. |
getDescription, getName, isFunction, isOperator
public Expression toExpression(ASTFunNode node)
PostfixMathCommandI
object from the function node
and delegate conversion to JepExpressionFunction
if that interface
is implemented. Otherwise check the ConverterFactory
for
a registered converter and use it.toExpression
in interface JepConversionFunction<ASTFunNode>
toExpression
in class AbstractJepConversionFunction<ASTFunNode>
node
- The object to convertBaseException
- If the node can't be convertedpublic Restriction toRestriction(ASTFunNode node)
PostfixMathCommandI
object from the function node
and delegate conversion to JepRestrictionFunction
if that interface
is implemented. Otherwise check the ConverterFactory
for
a registered converter and use it.
Get the Operator
object from the function node
and check the ConverterFactory
for
a registered converter and use it.toRestriction
in interface JepConversionFunction<ASTFunNode>
toRestriction
in class AbstractJepConversionFunction<ASTFunNode>
node
- The object to convertBaseException
- If the node can't be convertedprivate JepConversionFunction getConverter(org.nfunk.jep.function.PostfixMathCommandI function, Operator operator)