org.objectweb.medor.expression.lib
Class ExpressionPrinter

java.lang.Object
  extended byorg.objectweb.medor.expression.lib.ExpressionPrinter
All Implemented Interfaces:
IExpressionPrinter

public class ExpressionPrinter
extends java.lang.Object
implements IExpressionPrinter

This class is the default expression printer. It permits also to register IExpressionPrinter implementations.

Author:
S.Chassande-Barrioz

Constructor Summary
ExpressionPrinter()
           
 
Method Summary
static java.lang.String e2str(Expression e)
           
 java.lang.String expToString(Expression e)
          Returns String representation of the Expression.
static void registerPrinter(IExpressionPrinter p)
          Register a new printer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionPrinter

public ExpressionPrinter()
Method Detail

registerPrinter

public static void registerPrinter(IExpressionPrinter p)
Register a new printer.


e2str

public static java.lang.String e2str(Expression e)
Returns:
string representation of an expression using all registered printers. The result is never null. An unknown expression is represented by an empty string.

expToString

public java.lang.String expToString(Expression e)
Description copied from interface: IExpressionPrinter
Returns String representation of the Expression. If the printer is not able to obtain a string representation of the specified expression, the printer MUST return null.

Specified by:
expToString in interface IExpressionPrinter