public abstract class Expr
extends ValueExpression
| Modifier and Type | Field and Description |
|---|---|
protected static L10N |
L |
protected static java.util.logging.Logger |
log |
| Constructor and Description |
|---|
Expr() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
coerceToType(java.lang.Object obj,
java.lang.Class<?> targetType) |
Expr |
createField(Expr field)
Creates a field reference using this expression as the base object.
|
Expr |
createField(java.lang.String field)
Creates a field reference using this expression as the base object.
|
Expr |
createMethod(Expr[] args)
Creates a method call using this as the
obj.method
expression |
boolean |
equals(java.lang.Object o) |
static java.lang.Object |
error(java.lang.Throwable e,
ELContext env)
Returns an error object
|
java.math.BigDecimal |
evalBigDecimal(ELContext env)
Evaluate the expression, knowing the value should be a BigDecimal.
|
java.math.BigInteger |
evalBigInteger(ELContext env)
Evaluate the expression, knowing the value should be a BigInteger.
|
boolean |
evalBoolean(ELContext env)
Evaluate the expression, knowing the value should be a boolean.
|
char |
evalCharacter(ELContext env)
Evaluate the expression, knowing the value should be a string
|
double |
evalDouble(ELContext env)
Evaluate the expression, knowing the value should be a double.
|
long |
evalLong(ELContext env)
Evaluate the expression, knowing the value should be a long
|
java.lang.Object |
evalObject(ELContext env)
Evaluates the expression, returning an object.
|
long |
evalPeriod(ELContext env)
Evaluate the expression, knowing the value should be a period
|
java.lang.String |
evalString(ELContext env)
Evaluate the expression, knowing the value should be a string
|
java.lang.String |
evalStringWithNull(ELContext env)
Evaluate the expression, knowing the value should be a string
|
java.lang.Class<?> |
getExpectedType() |
java.lang.String |
getExpressionString() |
MethodInfo |
getMethodInfo(ELContext env,
java.lang.Class<?> returnType,
java.lang.Class<?>[] argTypes)
Evaluates the expression, returning an object.
|
java.lang.Class<?> |
getType(ELContext context) |
abstract java.lang.Object |
getValue(ELContext env)
Evaluates the expression, returning an object.
|
int |
hashCode() |
static java.lang.Object |
invocationError(java.lang.Throwable e)
Returns an error 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.
|
static boolean |
isDouble(java.lang.Object o)
Returns true for a double or double-equivalent.
|
protected static boolean |
isDoubleString(java.lang.Object obj) |
boolean |
isLiteralText()
Returns true if the expression is literal text
|
boolean |
isReadOnly(ELContext env)
Returns true if the expression is read-only.
|
boolean |
print(JspWriter out,
ELContext env,
boolean escapeXml)
Evaluates directly to the output.
|
boolean |
print(WriteStream out,
ELContext env,
boolean escapeXml)
Evaluates directly to the output.
|
void |
printCreate(WriteStream os)
Generates the code to regenerate the expression.
|
static void |
printEscaped(WriteStream os,
ReadStream is)
Write to the *.java stream escaping Java reserved characters.
|
static void |
printEscapedString(WriteStream os,
java.lang.String string)
Write to the *.java stream escaping Java reserved characters.
|
static void |
setProperty(java.lang.Object target,
java.lang.String property,
java.lang.Object value) |
void |
setValue(ELContext env,
java.lang.Object value)
Evaluates the expression, setting an object.
|
static java.math.BigDecimal |
toBigDecimal(java.lang.Object value,
ELContext env)
Converts some unknown value to a big decimal
|
static java.math.BigInteger |
toBigInteger(java.lang.Object value,
ELContext env)
Converts some unknown value to a big integer
|
static boolean |
toBoolean(java.lang.Object value,
ELContext env)
Converts some unknown value to a boolean.
|
static char |
toCharacter(java.lang.Object value,
ELContext env)
Converts some unknown value to a string.
|
static java.lang.Class<?> |
toClass(java.lang.Object value,
ELContext env)
jsp/3019
|
static double |
toDouble(java.lang.Object value,
ELContext env)
Converts some unknown value to a double.
|
static java.lang.Object |
toEnum(java.lang.Object obj,
java.lang.Class<? extends java.lang.Enum> enumType) |
static long |
toLong(java.lang.Object value,
ELContext env)
Converts some unknown value to a long.
|
static void |
toStream(JspWriter out,
java.lang.Object value)
Write to the stream.
|
static boolean |
toStream(JspWriter out,
java.lang.Object value,
boolean isEscaped)
Write to the stream.
|
static void |
toStream(WriteStream out,
java.lang.Object value)
Write to the stream.
|
static void |
toStreamEscaped(java.io.Writer out,
java.lang.Object value)
Write to the stream.
|
static void |
toStreamEscaped(java.io.Writer out,
java.io.Reader in)
Write to the stream escaping XML reserved characters.
|
static void |
toStreamEscaped(WriteStream out,
java.lang.Object value)
Write to the stream escaping XML reserved characters.
|
abstract java.lang.String |
toString() |
static java.lang.String |
toString(boolean value,
ELContext env)
Converts some unknown value to a string.
|
static java.lang.String |
toString(char value,
ELContext env)
Converts some unknown value to a string.
|
static java.lang.String |
toString(double value,
ELContext env)
Converts some unknown value to a string.
|
static java.lang.String |
toString(long value,
ELContext env)
Converts some unknown value to a string.
|
static java.lang.String |
toString(java.lang.Object value,
ELContext env)
Converts some unknown value to a string.
|
static java.lang.String |
toStringWithNull(java.lang.Object value,
ELContext env)
Converts some unknown value to a string.
|
protected static final java.util.logging.Logger log
protected static final L10N L
public boolean isConstant()
public boolean isReadOnly(ELContext env)
public boolean isLiteralText()
public Expr createField(Expr field)
field - the expression for the field.public Expr createField(java.lang.String field)
field - the string reference for the field.public Expr createMethod(Expr[] args)
obj.method
expressionargs - the arguments for the methodpublic abstract java.lang.Object getValue(ELContext env)
throws ELException
env - the variable environmentELExceptionpublic MethodInfo getMethodInfo(ELContext env,
java.lang.Class<?> returnType,
java.lang.Class<?>[] argTypes)
throws ELException
env - the variable environmentELExceptionpublic java.lang.Object invoke(ELContext env,
java.lang.Class<?>[] argTypes,
java.lang.Object[] args)
throws ELException
env - the variable environmentELExceptionpublic final java.lang.Object evalObject(ELContext env)
throws ELException
env - the variable environmentELExceptionpublic boolean evalBoolean(ELContext env)
throws ELException
env - the variable environmentELExceptionpublic double evalDouble(ELContext env)
throws ELException
env - the variable environmentELExceptionpublic long evalLong(ELContext env)
throws ELException
env - the variable environmentELExceptionpublic java.lang.String evalString(ELContext env)
throws ELException
env - the variable environmentELExceptionpublic java.lang.String evalStringWithNull(ELContext env)
throws ELException
env - the variable environmentELExceptionpublic char evalCharacter(ELContext env)
throws ELException
env - the variable environmentELExceptionpublic long evalPeriod(ELContext env)
throws ELException
env - the variable environmentELExceptionpublic java.math.BigInteger evalBigInteger(ELContext env)
throws ELException
env - the variable environmentELExceptionpublic java.math.BigDecimal evalBigDecimal(ELContext env)
throws ELException
env - the variable environmentELExceptionpublic void setValue(ELContext env,
java.lang.Object value)
throws PropertyNotFoundException,
PropertyNotWritableException,
ELException
env - the variable environmentPropertyNotFoundExceptionPropertyNotWritableExceptionELExceptionpublic boolean print(WriteStream out, ELContext env, boolean escapeXml) throws java.io.IOException, ELException
out - the output writerenv - the variable environmentescapeXml - if true, escape reserved XMLjava.io.IOExceptionELExceptionpublic boolean print(JspWriter out,
ELContext env,
boolean escapeXml)
throws java.io.IOException,
ELException
out - the output writerenv - the variable environmentescapeXml - if true, escape reserved XMLjava.io.IOExceptionELExceptionpublic void printCreate(WriteStream os) throws java.io.IOException
os - the stream to the *.java pagejava.io.IOExceptionpublic java.lang.String getExpressionString()
public java.lang.Class<?> getExpectedType()
public java.lang.Class<?> getType(ELContext context)
throws PropertyNotFoundException,
ELException
PropertyNotFoundExceptionELExceptionpublic static boolean isDouble(java.lang.Object o)
public static java.lang.String toStringWithNull(java.lang.Object value,
ELContext env)
value - the value to be converted.public static java.lang.String toString(java.lang.Object value,
ELContext env)
value - the value to be converted.public static java.lang.String toString(long value,
ELContext env)
value - the value to be converted.public static java.lang.String toString(double value,
ELContext env)
value - the value to be converted.public static java.lang.String toString(boolean value,
ELContext env)
value - the value to be converted.public static java.lang.String toString(char value,
ELContext env)
value - the value to be converted.public static char toCharacter(java.lang.Object value,
ELContext env)
throws ELException
value - the value to be converted.ELExceptionpublic static boolean toBoolean(java.lang.Object value,
ELContext env)
throws ELException
value - the value to be converted.ELExceptionpublic static double toDouble(java.lang.Object value,
ELContext env)
throws ELException
value - the value to be converted.ELExceptionpublic static java.math.BigDecimal toBigDecimal(java.lang.Object value,
ELContext env)
throws ELException
value - the value to be converted.ELExceptionpublic static java.math.BigInteger toBigInteger(java.lang.Object value,
ELContext env)
throws ELException
value - the value to be converted.ELExceptionpublic static long toLong(java.lang.Object value,
ELContext env)
throws ELException
value - the value to be converted.ELExceptionpublic static boolean toStream(JspWriter out,
java.lang.Object value,
boolean isEscaped)
throws java.io.IOException
out - the output streamvalue - the value to be written.java.io.IOExceptionpublic static void toStream(WriteStream out, java.lang.Object value) throws java.io.IOException
out - the output streamvalue - the value to be written.java.io.IOExceptionpublic static void toStream(JspWriter out,
java.lang.Object value)
throws java.io.IOException
out - the output streamvalue - the value to be written.java.io.IOExceptionpublic static void printEscapedString(WriteStream os, java.lang.String string) throws java.io.IOException
os - the output stream to the *.java code.string - the value to be converted.java.io.IOExceptionpublic static void toStreamEscaped(java.io.Writer out,
java.lang.Object value)
throws java.io.IOException
out - the output streamvalue - the value to be written.java.io.IOExceptionpublic static void toStreamEscaped(WriteStream out, java.lang.Object value) throws java.io.IOException
out - the output stream.value - the value to be converted.java.io.IOExceptionpublic static void toStreamEscaped(java.io.Writer out,
java.io.Reader in)
throws java.io.IOException
out - the output stream.in - the value to be converted.java.io.IOExceptionpublic static java.lang.Class<?> toClass(java.lang.Object value,
ELContext env)
throws ELException
ELExceptionpublic static java.lang.Object toEnum(java.lang.Object obj,
java.lang.Class<? extends java.lang.Enum> enumType)
public static void printEscaped(WriteStream os, ReadStream is) throws java.io.IOException
os - the output stream to the *.java code.is - the value to be converted.java.io.IOExceptionpublic static void setProperty(java.lang.Object target,
java.lang.String property,
java.lang.Object value)
throws ELException,
JspException
ELExceptionJspExceptionprotected static boolean isDoubleString(java.lang.Object obj)
public static java.lang.Object coerceToType(java.lang.Object obj,
java.lang.Class<?> targetType)
throws ELException
ELExceptionpublic static java.lang.Object error(java.lang.Throwable e,
ELContext env)
throws ELException
ELExceptionpublic int hashCode()
public boolean equals(java.lang.Object o)
public abstract java.lang.String toString()
public static java.lang.Object invocationError(java.lang.Throwable e)
throws ELException
ELException