|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.el.Expression
javax.el.ValueExpression
com.caucho.el.Expr
public abstract class Expr
Abstract implementation class for an expression.
Field Summary | |
---|---|
protected static L10N |
L
|
protected static java.util.logging.Logger |
log
|
Constructor Summary | |
---|---|
Expr()
|
Method Summary | |
---|---|
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. |
Methods inherited from class javax.el.ValueExpression |
---|
getValueReference |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final java.util.logging.Logger log
protected static final L10N L
Constructor Detail |
---|
public Expr()
Method Detail |
---|
public boolean isConstant()
public boolean isReadOnly(ELContext env)
isReadOnly
in class ValueExpression
public boolean isLiteralText()
isLiteralText
in class Expression
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
expression
args
- the arguments for the methodpublic abstract java.lang.Object getValue(ELContext env) throws ELException
getValue
in class ValueExpression
env
- the variable environment
ELException
public MethodInfo getMethodInfo(ELContext env, java.lang.Class<?> returnType, java.lang.Class<?>[] argTypes) throws ELException
env
- the variable environment
ELException
public java.lang.Object invoke(ELContext env, java.lang.Class<?>[] argTypes, java.lang.Object[] args) throws ELException
env
- the variable environment
ELException
public final java.lang.Object evalObject(ELContext env) throws ELException
env
- the variable environment
ELException
public boolean evalBoolean(ELContext env) throws ELException
env
- the variable environment
ELException
public double evalDouble(ELContext env) throws ELException
env
- the variable environment
ELException
public long evalLong(ELContext env) throws ELException
env
- the variable environment
ELException
public java.lang.String evalString(ELContext env) throws ELException
env
- the variable environment
ELException
public java.lang.String evalStringWithNull(ELContext env) throws ELException
env
- the variable environment
ELException
public char evalCharacter(ELContext env) throws ELException
env
- the variable environment
ELException
public long evalPeriod(ELContext env) throws ELException
env
- the variable environment
ELException
public java.math.BigInteger evalBigInteger(ELContext env) throws ELException
env
- the variable environment
ELException
public java.math.BigDecimal evalBigDecimal(ELContext env) throws ELException
env
- the variable environment
ELException
public void setValue(ELContext env, java.lang.Object value) throws PropertyNotFoundException, PropertyNotWritableException, ELException
setValue
in class ValueExpression
env
- the variable environment
PropertyNotFoundException
PropertyNotWritableException
ELException
public boolean print(WriteStream out, ELContext env, boolean escapeXml) throws java.io.IOException, ELException
out
- the output writerenv
- the variable environmentescapeXml
- if true, escape reserved XML
java.io.IOException
ELException
public boolean print(JspWriter out, ELContext env, boolean escapeXml) throws java.io.IOException, ELException
out
- the output writerenv
- the variable environmentescapeXml
- if true, escape reserved XML
java.io.IOException
ELException
public void printCreate(WriteStream os) throws java.io.IOException
os
- the stream to the *.java page
java.io.IOException
public java.lang.String getExpressionString()
getExpressionString
in class Expression
public java.lang.Class<?> getExpectedType()
getExpectedType
in class ValueExpression
public java.lang.Class<?> getType(ELContext context) throws PropertyNotFoundException, ELException
getType
in class ValueExpression
PropertyNotFoundException
ELException
public 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.
ELException
public static boolean toBoolean(java.lang.Object value, ELContext env) throws ELException
value
- the value to be converted.
ELException
public static double toDouble(java.lang.Object value, ELContext env) throws ELException
value
- the value to be converted.
ELException
public static java.math.BigDecimal toBigDecimal(java.lang.Object value, ELContext env) throws ELException
value
- the value to be converted.
ELException
public static java.math.BigInteger toBigInteger(java.lang.Object value, ELContext env) throws ELException
value
- the value to be converted.
ELException
public static long toLong(java.lang.Object value, ELContext env) throws ELException
value
- the value to be converted.
ELException
public 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.IOException
public static void toStream(WriteStream out, java.lang.Object value) throws java.io.IOException
out
- the output streamvalue
- the value to be written.
java.io.IOException
public static void toStream(JspWriter out, java.lang.Object value) throws java.io.IOException
out
- the output streamvalue
- the value to be written.
java.io.IOException
public 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.IOException
public 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.IOException
public 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.IOException
public 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.IOException
public static java.lang.Class<?> toClass(java.lang.Object value, ELContext env) throws ELException
ELException
public 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.IOException
public static void setProperty(java.lang.Object target, java.lang.String property, java.lang.Object value) throws ELException, JspException
ELException
JspException
protected static boolean isDoubleString(java.lang.Object obj)
public static java.lang.Object coerceToType(java.lang.Object obj, java.lang.Class<?> targetType) throws ELException
ELException
public static java.lang.Object error(java.lang.Throwable e, ELContext env) throws ELException
ELException
public int hashCode()
hashCode
in class Expression
public boolean equals(java.lang.Object o)
equals
in class Expression
public abstract java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.Object invocationError(java.lang.Throwable e) throws ELException
ELException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |