com.caucho.el
Class StringLiteral

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

public class StringLiteral
extends Expr

Represents a string literal expression

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.caucho.el.Expr
L, log
 
Constructor Summary
StringLiteral(java.lang.String value)
           
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns true for equal strings.
 java.lang.String evalString(ELContext env)
          Evaluate the expr as a string
 MethodInfo getMethodInfo(ELContext env, java.lang.Class<?> returnType, java.lang.Class<?>[] argTypes)
          Evaluates the expression, returning an object.
 java.lang.String getValue()
          Returns the value of the literal.
 java.lang.Object getValue(ELContext env)
          Evaluate the expr as an object.
 java.lang.Object invoke(ELContext env, java.lang.Class<?>[] argTypes, java.lang.Object[] args)
          Evaluates the expression, returning an object.
 boolean isConstant()
          Returns true if the expression is constant.
 boolean isLiteralText()
          Returns true if the expression is literal text
 boolean print(WriteStream out, ELContext env, boolean isEscape)
          Evalutes directly to the output.
 void printCreate(WriteStream os)
          Prints the code to create an LongLiteral.
 java.lang.String toString()
          Returns a printable version.
 
Methods inherited from class com.caucho.el.Expr
coerceToType, createField, createField, createMethod, error, evalBigDecimal, evalBigInteger, evalBoolean, evalCharacter, evalDouble, evalLong, evalObject, evalPeriod, evalStringWithNull, getExpectedType, getExpressionString, getType, hashCode, invocationError, isDouble, isDoubleString, 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

StringLiteral

public StringLiteral(java.lang.String value)
Method Detail

isConstant

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

Overrides:
isConstant in class Expr

isLiteralText

public boolean isLiteralText()
Returns true if the expression is literal text

Overrides:
isLiteralText in class Expr

getMethodInfo

public MethodInfo getMethodInfo(ELContext env,
                                java.lang.Class<?> returnType,
                                java.lang.Class<?>[] argTypes)
                         throws ELException
Evaluates the expression, returning an object.

Overrides:
getMethodInfo in class Expr
Parameters:
env - the variable environment
Returns:
the value of the expression as an object
Throws:
ELException

invoke

public java.lang.Object invoke(ELContext env,
                               java.lang.Class<?>[] argTypes,
                               java.lang.Object[] args)
                        throws ELException
Evaluates the expression, returning an object.

Overrides:
invoke in class Expr
Parameters:
env - the variable environment
Returns:
the value of the expression as an object
Throws:
ELException

getValue

public java.lang.String getValue()
Returns the value of the literal.


getValue

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

Specified by:
getValue in class Expr
Parameters:
env - the variable environment
Returns:
the value of the expression as an object
Throws:
ELException

evalString

public java.lang.String evalString(ELContext env)
                            throws ELException
Evaluate the expr as a string

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 isEscape)
              throws java.io.IOException,
                     ELException
Evalutes directly to the output.

Overrides:
print in class Expr
Parameters:
out - the output writer
env - the variable environment
isEscape - if true, escape reserved XML
Returns:
true if the object is null, otherwise false
Throws:
java.io.IOException
ELException

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

toString

public java.lang.String toString()
Returns a printable version.

Specified by:
toString in class Expr