public class StringLiteral extends Expr
Constructor and Description |
---|
StringLiteral(java.lang.String value) |
Modifier and Type | Method and Description |
---|---|
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.
|
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, toClass, toDouble, toEnum, toLong, toStream, toStream, toStream, toStreamEscaped, toStreamEscaped, toStreamEscaped, toString, toString, toString, toString, toString, toStringWithNull
getValueReference
public boolean isConstant()
isConstant
in class Expr
public boolean isLiteralText()
isLiteralText
in class Expr
public MethodInfo getMethodInfo(ELContext env, java.lang.Class<?> returnType, java.lang.Class<?>[] argTypes) throws ELException
getMethodInfo
in class Expr
env
- the variable environmentELException
public java.lang.Object invoke(ELContext env, java.lang.Class<?>[] argTypes, java.lang.Object[] args) throws ELException
invoke
in class Expr
env
- the variable environmentELException
public java.lang.String getValue()
public java.lang.Object getValue(ELContext env) throws ELException
getValue
in class Expr
env
- the variable environmentELException
public java.lang.String evalString(ELContext env) throws ELException
evalString
in class Expr
env
- the variable environmentELException
public boolean print(WriteStream out, ELContext env, boolean isEscape) throws java.io.IOException, ELException
print
in class Expr
out
- the output writerenv
- the variable environmentisEscape
- if true, escape reserved XMLjava.io.IOException
ELException
public void printCreate(WriteStream os) throws java.io.IOException
printCreate
in class Expr
os
- the stream to the *.java pagejava.io.IOException
public boolean equals(java.lang.Object o)