|
|||||||||
| Home >> All >> [ bsh overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
bsh
Class LHS

java.lang.Objectbsh.LHS
- All Implemented Interfaces:
- ParserConstants, java.io.Serializable
- class LHS
- extends java.lang.Object
- implements ParserConstants, java.io.Serializable
- extends java.lang.Object
An LHS is a wrapper for an variable, field, or property. It ordinarily holds the "left hand side" of an assignment and may be either resolved to a value or assigned a value.
There is one special case here termed METHOD_EVAL where the LHS is used in an intermediate evaluation of a chain of suffixes and wraps a method invocation. In this case it may only be resolved to a value and cannot be assigned. (You can't assign a value to the result of a method call e.g. "foo() = 5;").
| Field Summary | |
(package private) java.lang.reflect.Field |
field
|
(package private) static int |
FIELD
Identifiers for the various types of LHS. |
(package private) int |
index
|
(package private) static int |
INDEX
Identifiers for the various types of LHS. |
(package private) boolean |
localVar
The assignment should be to a local variable |
(package private) static int |
METHOD_EVAL
Identifiers for the various types of LHS. |
(package private) NameSpace |
nameSpace
|
(package private) java.lang.Object |
object
|
(package private) static int |
PROPERTY
Identifiers for the various types of LHS. |
(package private) java.lang.String |
propName
|
(package private) int |
type
|
(package private) static int |
VARIABLE
Identifiers for the various types of LHS. |
(package private) java.lang.String |
varName
|
| Constructor Summary | |
(package private) |
LHS(java.lang.reflect.Field field)
Static field LHS Constructor. |
(package private) |
LHS(NameSpace nameSpace,
java.lang.String varName)
Variable LHS constructor. |
(package private) |
LHS(NameSpace nameSpace,
java.lang.String varName,
boolean localVar)
|
(package private) |
LHS(java.lang.Object object,
java.lang.reflect.Field field)
Object field LHS Constructor. |
(package private) |
LHS(java.lang.Object array,
int index)
Array index LHS Constructor. |
(package private) |
LHS(java.lang.Object object,
java.lang.String propName)
Object property LHS Constructor. |
| Method Summary | |
java.lang.Object |
assign(java.lang.Object val,
boolean strictJava)
Assign a value to the LHS. |
java.lang.Object |
getValue()
|
java.lang.String |
toString()
Convert this Object to a human-readable String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
nameSpace
NameSpace nameSpace
localVar
boolean localVar
- The assignment should be to a local variable
VARIABLE
static final int VARIABLE
- Identifiers for the various types of LHS.
- See Also:
- Constant Field Values
FIELD
static final int FIELD
- Identifiers for the various types of LHS.
- See Also:
- Constant Field Values
PROPERTY
static final int PROPERTY
- Identifiers for the various types of LHS.
- See Also:
- Constant Field Values
INDEX
static final int INDEX
- Identifiers for the various types of LHS.
- See Also:
- Constant Field Values
METHOD_EVAL
static final int METHOD_EVAL
- Identifiers for the various types of LHS.
- See Also:
- Constant Field Values
type
int type
varName
java.lang.String varName
propName
java.lang.String propName
field
java.lang.reflect.Field field
object
java.lang.Object object
index
int index
| Constructor Detail |
LHS
LHS(NameSpace nameSpace, java.lang.String varName)
- Variable LHS constructor.
LHS
LHS(NameSpace nameSpace, java.lang.String varName, boolean localVar)
LHS
LHS(java.lang.reflect.Field field)
- Static field LHS Constructor.
This simply calls Object field constructor with null object.
LHS
LHS(java.lang.Object object, java.lang.reflect.Field field)
- Object field LHS Constructor.
LHS
LHS(java.lang.Object object, java.lang.String propName)
- Object property LHS Constructor.
LHS
LHS(java.lang.Object array, int index)
- Array index LHS Constructor.
| Method Detail |
getValue
public java.lang.Object getValue() throws UtilEvalError
assign
public java.lang.Object assign(java.lang.Object val, boolean strictJava) throws UtilEvalError
- Assign a value to the LHS.
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
|
|||||||||
| Home >> All >> [ bsh overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
bsh.LHS