net.sf.jsqlparser.util.deparser
Class ExpressionDeParser
java.lang.Object
net.sf.jsqlparser.util.deparser.ExpressionDeParser
- All Implemented Interfaces:
- ExpressionVisitor, ItemsListVisitor
public class ExpressionDeParser
- extends java.lang.Object
- implements ExpressionVisitor, ItemsListVisitor
A class to de-parse (that is, tranform from JSqlParser hierarchy into a string)
an Expression
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buffer
protected java.lang.StringBuffer buffer
selectVisitor
protected SelectVisitor selectVisitor
ExpressionDeParser
public ExpressionDeParser()
ExpressionDeParser
public ExpressionDeParser(SelectVisitor selectVisitor,
java.lang.StringBuffer buffer)
- Parameters:
selectVisitor
- a SelectVisitor to de-parse SubSelects. It has to share the same
StringBuffer as this object in order to work, as:
StringBuffer myBuf = new StringBuffer();
MySelectDeparser selectDeparser = new MySelectDeparser();
selectDeparser.setBuffer(myBuf);
ExpressionDeParser expressionDeParser = new ExpressionDeParser(selectDeparser, myBuf);
buffer
- the buffer that will be filled with the expression
getBuffer
public java.lang.StringBuffer getBuffer()
setBuffer
public void setBuffer(java.lang.StringBuffer buffer)
visit
public void visit(Addition addition)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(AndExpression andExpression)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(Between between)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(Division division)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(DoubleValue doubleValue)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(EqualsTo equalsTo)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(GreaterThan greaterThan)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(GreaterThanEquals greaterThanEquals)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(InExpression inExpression)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(InverseExpression inverseExpression)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(IsNullExpression isNullExpression)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(JdbcParameter jdbcParameter)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(LikeExpression likeExpression)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(ExistsExpression existsExpression)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(LongValue longValue)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(MinorThan minorThan)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(MinorThanEquals minorThanEquals)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(Multiplication multiplication)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(NotEqualsTo notEqualsTo)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(NullValue nullValue)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(OrExpression orExpression)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(Parenthesis parenthesis)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(StringValue stringValue)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(Subtraction subtraction)
- Specified by:
visit
in interface ExpressionVisitor
visitBinaryExpression
private void visitBinaryExpression(BinaryExpression binaryExpression,
java.lang.String operator)
visit
public void visit(SubSelect subSelect)
- Specified by:
visit
in interface ExpressionVisitor
- Specified by:
visit
in interface ItemsListVisitor
visit
public void visit(Column tableColumn)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(Function function)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(ExpressionList expressionList)
- Specified by:
visit
in interface ItemsListVisitor
getSelectVisitor
public SelectVisitor getSelectVisitor()
setSelectVisitor
public void setSelectVisitor(SelectVisitor visitor)
visit
public void visit(DateValue dateValue)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(TimestampValue timestampValue)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(TimeValue timeValue)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(CaseExpression caseExpression)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(WhenClause whenClause)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(AllComparisonExpression allComparisonExpression)
- Specified by:
visit
in interface ExpressionVisitor
visit
public void visit(AnyComparisonExpression anyComparisonExpression)
- Specified by:
visit
in interface ExpressionVisitor