Class AbstractRewriter<T>

  • Type Parameters:
    T - The type of object being rewritten.
    Direct Known Subclasses:
    ElementRewriter, ExprRewriter, PathRewriter

    public class AbstractRewriter<T>
    extends java.lang.Object
    The base class for rewriters. Rewriters push and pop items on the stack during processing.
    • Method Detail

      • getResult

        public final T getResult()
        Get the result from the rewriter. Returns the top of the stack.
        Returns:
        The final result or null if there is no answer.
      • rewrite

        public final java.util.List<Triple> rewrite​(java.util.List<Triple> src)
        Rewrite a list of triples.
        Parameters:
        src - The list of triples to rewrite.
        Returns:
        The list of rewritten triples.
      • rewrite

        public final VarExprList rewrite​(VarExprList lst)
        Rewrite a variable expression list.
        Parameters:
        lst - The variable expression list.
        Returns:
        the rewritten variable expression list.