bsh
Class LHS
java.lang.Object
|
+--bsh.LHS
- All Implemented Interfaces:
- ParserConstants, java.io.Serializable
- class LHS
- extends java.lang.Object
- implements ParserConstants, java.io.Serializable
The left hand side in an assignment
This is probably the most debatable design issue in bsh...
Because of the way things started, the grammar splits on whether
something is an LHS or not... The alternative would be to wrap all
objects in bsh, rather than just carrying types that might be used in
an assignment. Wrapping all objects, say, in a generalized BshObject
type, would also provide a nice place to put all the reflection stuff,
which is now static in bsh.Reflect
Field Summary |
(package private) java.lang.reflect.Field |
field
|
(package private) static int |
FIELD
|
(package private) int |
index
|
(package private) static int |
INDEX
|
(package private) NameSpace |
nameSpace
|
(package private) java.lang.Object |
object
|
(package private) static int |
PROPERTY
|
(package private) java.lang.String |
propName
|
(package private) int |
type
|
(package private) static int |
VARIABLE
|
(package private) java.lang.String |
varName
|
Fields inherited from interface bsh.ParserConstants |
_DEFAULT, ANDASSIGN, ANDASSIGNX, ASSIGN, BANG, BIT_AND, BIT_ANDX, BIT_OR, BIT_ORX, BOOL_AND, BOOL_ANDX, BOOL_OR, BOOL_ORX, BOOLEAN, BREAK, BYTE, CASE, CATCH, CHAR, CHARACTER_LITERAL, CLASS, COLON, COMMA, CONST, CONTINUE, DECIMAL_LITERAL, DECR, DEFAULT, DIGIT, DO, DOT, DOUBLE, ELSE, EOF, EQ, EXPONENT, FALSE, FINAL, FINALLY, FLOAT, FLOATING_POINT_LITERAL, FOR, FORMAL_COMMENT, GE, GEX, GOTO, GT, GTX, HASH_BANG_COMMENT, HEX_LITERAL, HOOK, IDENTIFIER, IF, IMPORT, INCR, INSTANCEOF, INT, INTEGER_LITERAL, INTERFACE, LBRACE, LBRACKET, LE, LETTER, LEX, LONG, LPAREN, LSHIFT, LSHIFTASSIGN, LSHIFTASSIGNX, LSHIFTX, LT, LTX, MINUS, MINUSASSIGN, MOD, MODASSIGN, MULTI_LINE_COMMENT, NE, NEW, NONPRINTABLE, NULL, OCTAL_LITERAL, ORASSIGN, ORASSIGNX, PLUS, PLUSASSIGN, PRIVATE, PROTECTED, PUBLIC, RBRACE, RBRACKET, RETURN, RPAREN, RSIGNEDSHIFT, RSIGNEDSHIFTASSIGN, RSIGNEDSHIFTASSIGNX, RSIGNEDSHIFTX, RUNSIGNEDSHIFT, RUNSIGNEDSHIFTASSIGN, RUNSIGNEDSHIFTASSIGNX, RUNSIGNEDSHIFTX, SEMICOLON, SHORT, SINGLE_LINE_COMMENT, SLASH, SLASHASSIGN, STAR, STARASSIGN, STATIC, STRING_LITERAL, SWITCH, THROW, TILDE, tokenImage, TRUE, TRY, VOID, WHILE, XOR, XORASSIGN |
Constructor Summary |
(package private) |
LHS(java.lang.reflect.Field field)
|
(package private) |
LHS(NameSpace nameSpace,
java.lang.String varName)
|
(package private) |
LHS(java.lang.Object object,
java.lang.reflect.Field field)
|
(package private) |
LHS(java.lang.Object array,
int index)
|
(package private) |
LHS(java.lang.Object object,
java.lang.String propName)
|
Method Summary |
java.lang.Object |
assign(java.lang.Object val)
|
java.lang.Object |
getValue()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
nameSpace
NameSpace nameSpace
VARIABLE
static final int VARIABLE
- See Also:
- Constant Field Values
FIELD
static final int FIELD
- See Also:
- Constant Field Values
PROPERTY
static final int PROPERTY
- See Also:
- Constant Field Values
INDEX
static final int INDEX
- 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
LHS
LHS(NameSpace nameSpace,
java.lang.String varName)
LHS
LHS(java.lang.reflect.Field field)
LHS
LHS(java.lang.Object object,
java.lang.reflect.Field field)
LHS
LHS(java.lang.Object object,
java.lang.String propName)
LHS
LHS(java.lang.Object array,
int index)
getValue
public java.lang.Object getValue()
throws EvalError
EvalError
assign
public java.lang.Object assign(java.lang.Object val)
throws EvalError
EvalError
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object