java.beans
public class: Expression [javadoc |
source]
java.lang.Object
java.beans.Statement
java.beans.Expression
An
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.
| Constructor: |
public Expression(Object target,
String methodName,
Object[] arguments) {
super(target, methodName, arguments);
}
Creates a new Statement object with a target,
methodName and arguments as per the parameters. Parameters:
target - The target of this expression.
methodName - The methodName of this expression.
arguments - The arguments of this expression. If null then an empty array will be used.
Also see:
- getValue
|
public Expression(Object value,
Object target,
String methodName,
Object[] arguments) {
this(target, methodName, arguments);
setValue(value);
}
Creates a new Expression object for a method
that returns a result. The result will never be calculated
however, since this constructor uses the value
parameter to set the value property by calling the
setValue method. Parameters:
value - The value of this expression.
target - The target of this expression.
methodName - The methodName of this expression.
arguments - The arguments of this expression. If null then an empty array will be used.
Also see:
- setValue
|
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |