Class AristaFlowExpressionEngine

  • All Implemented Interfaces:
    org.apache.commons.configuration2.tree.ExpressionEngine

    public class AristaFlowExpressionEngine
    extends org.apache.commons.configuration2.tree.DefaultExpressionEngine
    An expression engine for hierarchical configurations of Apache Commons Configuration. Usually the default uses some intelligence to support indexed and attribute access in keys. We do not need this at all. However, we cannot just set the default expression engine. This is set statically. Therefore a customer may override our expression engine or we may override the expression engine of a customer. Neither is desired, we have to set the expression engine on an instance basis rather than on the class basis.

    Important! Since a HierarchicalConfiguration creates new instances for subsets, make sure to set our expression engine after retrieving a subset.

    • Field Summary

      • Fields inherited from class org.apache.commons.configuration2.tree.DefaultExpressionEngine

        INSTANCE
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AristaFlowExpressionEngine()
      Creates a new expression engine for a HierarchicalConfiguration disabling attributes and indexes.
    • Constructor Detail

      • AristaFlowExpressionEngine

        protected AristaFlowExpressionEngine()
        Creates a new expression engine for a HierarchicalConfiguration disabling attributes and indexes.
    • Method Detail

      • setExpressionEngine

        public static org.apache.commons.configuration2.Configuration setExpressionEngine​(org.apache.commons.configuration2.Configuration conf)
        Sets a new expression engine for the designated configuration. The expression engine is only relevant for AristaFlowExpressionEngines.
        Note that this method has to be called for every new subset of a configuration. A HierarchicalConfiguration creates new instances in this case which do not inherit the expression engine of the parent configuration.
        Parameters:
        conf - The configuration in which to set a new expression engine if appropriate.
        Returns:
        The designated configuration which allows to call this method in the call of the super-constructor.