Class RefExpRemover

  • All Implemented Interfaces:
    ExpressionVisitorExpression

    public class RefExpRemover
    extends ExpressionCloner
    removes all ReferenceExp from AGM. when named expression is nullSet, it cannot be used. by replacing ReferenceExp by its definition, those unavailable expressions will be properly removed from AGM.
    • Field Detail

      • visitedElements

        private final java.util.Set visitedElements
        set of visited ElementExps
      • recursive

        private final boolean recursive
    • Constructor Detail

      • RefExpRemover

        public RefExpRemover​(ExpressionPool pool,
                             boolean _recursive)
        Parameters:
        _recursive -

        If true, this object behaves destructively. It recursively visits all the reachable expressions and removes ReferenceExps. In this process, this object changes the content model of ElementExps.

        If false, this object doesn't visit the content models of child elements, therefore, it behaves non-destructively. Nothing in the original expression will be touched.