org.grinvin.expr

Class ExpressionSaver

Implemented Interfaces:
Expression.Visitor

public class ExpressionSaver
extends java.lang.Object
implements Expression.Visitor

Helper methods for saving expressions to disk.

Method Summary

static void
save(Expression expression, Element element)
Save the given expression into the given JDOM element.
static void
save(ExpressionList list, Element element)
Save the given list of expressions into the given JDOM element.
void
visitCompound(Compound compound)
void
visitIntegerLiteral(IntegerLiteral literal)
void
visitInvariant(Invariant invariant)

Method Details

save

public static void save(Expression expression,
                        Element element)
Save the given expression into the given JDOM element.

save

public static void save(ExpressionList list,
                        Element element)
Save the given list of expressions into the given JDOM element.

visitCompound

public void visitCompound(Compound compound)
Specified by:
visitCompound in interface Expression.Visitor

visitIntegerLiteral

public void visitIntegerLiteral(IntegerLiteral literal)
Specified by:
visitIntegerLiteral in interface Expression.Visitor

visitInvariant

public void visitInvariant(Invariant invariant)
Specified by:
visitInvariant in interface Expression.Visitor