Expression object represents a primitive expression
in which a single method is applied to a target and a set of
arguments to return a result - as in "a.getFoo()".
In addition to the properties of the super class, the
Expression object provides a value which
is the object returned when this expression is evaluated.
The return value is typically not provided by the caller and
is instead computed by dynamically finding the method and invoking
it when the first call to getValue is made.
getValue, setValue
| Modifier and Type | Field and Description |
|---|---|
| private static Object | |
| private Object |
| Access | Constructor and Description |
|---|---|
| public | Expression(Object
the target object of this expression target, String the name of the method to invoke on the specified target methodName, Object[] the array of arguments to invoke the specified method arguments)Creates a new |
| public | Expression(Object
the value of this expression value, Object the target object of this expression target, String the name of the method to invoke on the specified target methodName, Object[] the array of arguments to invoke the specified method arguments)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | execute()
Overrides java. The |
| public Object | Returns: The result of applying this method to these arguments.If the value property of this instance is not already set, this method dynamically finds the method with the specified methodName on this target with these arguments and calls it. |
| pack-priv String | |
| public void | |
| public String | toString()
Overrides java. Prints the value of this expression using a Java-style syntax. |
| unbound | back to summary |
|---|---|
| private static Object unbound | |
| value | back to summary |
|---|---|
| private Object value | |
| Expression | back to summary |
|---|---|
| public Expression(Object target, String methodName, Object[] arguments) Creates a new
The
| |
| Expression | back to summary |
|---|---|
| public Expression(Object value, Object target, String methodName, Object[] arguments) Creates a new
The | |
| execute | back to summary |
|---|---|
| public void execute() throws Exception Overrides java. Doc from java. The The following method types are handled as special cases:
If the invoked method completes normally,
the value it returns is copied in the
| |
| getValue | back to summary |
|---|---|
| public Object getValue() throws Exception If the value property of this instance is not already set,
this method dynamically finds the method with the specified
methodName on this target with these arguments and calls it.
The result of the method invocation is first copied
into the value property of this expression and then returned
as the result of
The value property of an
See the
| |
| instanceName | back to summary |
|---|---|
| pack-priv String instanceName(Object instance) Overrides java.
| |
| setValue | back to summary |
|---|---|
| public void setValue(Object value) Sets the value of this expression to | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Prints the value of this expression using a Java-style syntax.
| |