|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--java.util.Stack
|
+--jreversepro.runtime.JOperandStack
Operand Stack is the abstraction of the Java Method Operand Stack. The variables are pushed to and popped from, this stack.
| Field Summary |
| Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Fields inherited from interface jreversepro.common.KeyWords |
ANY, BOOLEAN, BREAK, BYTE, CASE, CHAR, CLASS, CLASS_STRING, CLINIT, CLOSE_BRACKET, COND_AND, COND_NOT, COND_OR, CONTINUE, DEFAULT, DEFAULT_PACKAGE, DOUBLE, EQUALTO, FALSE, FLOAT, FOREIGN_CLASS, FOREIGN_OBJ, GOTO, INIT, INSTANCEOF, INT, INTERFACE, JVM_BOOLEAN, JVM_CHAR, JVM_VOID, LANG_OBJECT, LENGTH, LONG, NEW, NULL, OPEN_BRACKET, OPR_EQ, OPR_GE, OPR_GT, OPR_LE, OPR_LT, OPR_NE, OPR_NOT, REFERENCE, RET_ADDR, RETURN, SHORT, SPACE, STATIC, SUPER, SWITCH, THIS, THISCLASS, THROW, TRUE, VOID |
| Fields inherited from interface jreversepro.runtime.OperandConstants |
L_ADD, L_BITAND, L_BITOR, L_BITXOR, L_CAST, L_COMMA, L_DIV, L_EVAL, L_INDEX, L_LOGAND, L_LOGEQ, L_LOGIOF, L_LOGNEQ, L_LOGOR, L_LOGREL, L_MOD, L_MUL, L_REF, L_SHIFT, L_SUB, L_TERN, L_UNARY, VALUE |
| Constructor Summary | |
JOperandStack()
Empty constructor |
|
| Method Summary | |
void |
addConstant(java.lang.String constant)
Adds a new constant. |
java.util.List |
getConstants()
|
java.lang.String |
getConstantValues()
Returns the values of the constants serialized such that it corresponds to java syntax code too. |
boolean |
isTopDatatypeForeign()
Lets us know if the top data type is foreign. |
void |
mergeTopTwo()
Merges the top two contents of the operand stack. |
void |
push(int value,
java.lang.String datatype,
int precedence)
|
void |
push(java.lang.String value,
java.lang.String datatype,
int precedence)
|
void |
removeAllConstants()
Deletes all the constants that were stored in the vector already. |
java.lang.String |
topDatatype()
|
| Methods inherited from class java.util.Stack |
empty, peek, pop, push, search |
| Methods inherited from class java.util.Vector |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.util.AbstractList |
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
iterator, listIterator, listIterator |
| Constructor Detail |
public JOperandStack()
| Method Detail |
public void addConstant(java.lang.String constant)
constant - New Constant to be added to the vector.public void removeAllConstants()
public java.util.List getConstants()
public java.lang.String getConstantValues()
public void push(java.lang.String value,
java.lang.String datatype,
int precedence)
value - Value of the Operand - Stack element.
The Value is String.datatype - Datatype of the stack element.precedence - precedence of the stack element.
public void push(int value,
java.lang.String datatype,
int precedence)
value - Value of the Operand - Stack element.
The Value is int.datatype - Datatype of the stack element.precedence - precedence of the stack element.public java.lang.String topDatatype()
public boolean isTopDatatypeForeign()
public void mergeTopTwo()
throws RevEngineException
RevEngineException - Thrown when there are less than 2 elements
in the stack.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||