Class ExpressionTypeVisitor

  • All Implemented Interfaces:
    ExpressionVisitor

    public class ExpressionTypeVisitor
    extends Object
    implements ExpressionVisitor
    Returns the output type of the visited expression, taking into account functions output types, property types, and general promotion rules in arithmetic expressions
    Author:
    Andrea Aime - GeoSolutions
    • Constructor Detail

      • ExpressionTypeVisitor

        public ExpressionTypeVisitor​(FeatureType featureType)
    • Method Detail

      • visit

        public Object visit​(NilExpression expression,
                            Object extraData)
        Description copied from interface: ExpressionVisitor
        Used to visit a Expression.NIL, also called for null where an expression is expected.

        This is particularly useful when doing data transformations, as an example when using a StyleSymbolizer Expression.NIL can be used to represent the default stroke color.

        Specified by:
        visit in interface ExpressionVisitor
        Returns:
        implementation specific
      • visitBinaryExpression

        protected Class<?> visitBinaryExpression​(BinaryExpression expression)
      • visitIfThenElse

        protected Object visitIfThenElse​(FilterFunction_if_then_else expression)
        Special case for the if then else function, which stores parameters in the second and third list items
        Parameters:
        expression - IfThenElse function
        Returns:
        The common ancestor type of the two parameters possibly returned by if then else