com.caucho.el
Class InterpolateExpr

java.lang.Object
  extended by javax.el.Expression
      extended by javax.el.ValueExpression
          extended by com.caucho.el.Expr
              extended by com.caucho.el.InterpolateExpr
All Implemented Interfaces:
java.io.Serializable

public class InterpolateExpr
extends Expr

Representing a string interpolation expression.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.caucho.el.Expr
L, log
 
Constructor Summary
InterpolateExpr(Expr left, Expr right)
          Create a new interpolation expression.
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns true for equal strings.
 java.lang.String evalString(ELContext env)
          Evaluate the expression as an object.
 java.lang.Object getValue(ELContext env)
          Evaluate the expression as an object.
 boolean isConstant()
          Returns true if this is a constant expression.
 boolean print(WriteStream out, ELContext env, boolean escapeXml)
          Prints the interpolated value directly to the output.
 void printCreate(WriteStream os)
          Prints the code to create an LongLiteral.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.el.Expr
coerceToType, createField, createField, createMethod, error, evalBigDecimal, evalBigInteger, evalBoolean, evalCharacter, evalDouble, evalLong, evalObject, evalPeriod, evalStringWithNull, getExpectedType, getExpressionString, getMethodInfo, getType, hashCode, invocationError, invoke, isDouble, isDoubleString, isLiteralText, isReadOnly, print, printEscaped, printEscapedString, setProperty, setValue, toBigDecimal, toBigInteger, toBoolean, toCharacter, toDouble, toEnum, toLong, toStream, toStream, toStream, toStreamEscaped, toStreamEscaped, toStreamEscaped, toString, toString, toString, toString, toString, toStringWithNull
 
Methods inherited from class javax.el.ValueExpression
getValueReference
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InterpolateExpr

public InterpolateExpr(Expr left,
                       Expr right)
Create a new interpolation expression.

Parameters:
left - the left subexpression
right - the right subexpression
Method Detail

isConstant

public boolean isConstant()
Returns true if this is a constant expression.

Overrides:
isConstant in class Expr

getValue

public java.lang.Object getValue(ELContext env)
                          throws ELException
Evaluate the expression as an object.

Specified by:
getValue in class Expr
Parameters:
env - the variable environment
Returns:
the string value
Throws:
ELException

evalString

public java.lang.String evalString(ELContext env)
                            throws ELException
Evaluate the expression as an object.

Overrides:
evalString in class Expr
Parameters:
env - the variable environment
Returns:
the value of the expression as a string
Throws:
ELException

print

public boolean print(WriteStream out,
                     ELContext env,
                     boolean escapeXml)
              throws java.io.IOException,
                     ELException
Prints the interpolated value directly to the output.

Overrides:
print in class Expr
Parameters:
out - the output stream
env - the variable environment
escapeXml - if true, then escape the output
Returns:
false, since the interpolated value is never null
Throws:
java.io.IOException
ELException

toString

public java.lang.String toString()
Specified by:
toString in class Expr

printCreate

public void printCreate(WriteStream os)
                 throws java.io.IOException
Prints the code to create an LongLiteral.

Overrides:
printCreate in class Expr
Parameters:
os - the stream to the *.java page
Throws:
java.io.IOException

equals

public boolean equals(java.lang.Object o)
Returns true for equal strings.

Overrides:
equals in class Expr