001: /*
002: * Operand.java Copyright (c) 2006,07 Swaroop Belur
003: *
004: * This program is free software; you can redistribute it and/or
005: * modify it under the terms of the GNU General Public License
006: * as published by the Free Software Foundation; either version 2
007: * of the License, or (at your option) any later version.
008:
009: * This program is distributed in the hope that it will be useful,
010: * but WITHOUT ANY WARRANTY; without even the implied warranty of
011: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
012: * GNU General Public License for more details.
013:
014: * You should have received a copy of the GNU General Public License
015: * along with this program; if not, write to the Free Software
016: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
017: *
018: */
019: package net.sf.jdec.core;
020:
021: public class Operand {
022:
023: private String operandName;
024: private int operandType;
025: private Object operandValue;
026: private int category;
027:
028: public boolean isMultiDimension() {
029: return isMultiDimension;
030: }
031:
032: public void setMultiDimension(boolean multiDimension) {
033: isMultiDimension = multiDimension;
034: }
035:
036: private boolean isMultiDimension = false;
037:
038: private java.lang.String classType = "";
039: private java.lang.String localVarType = "";
040:
041: public String getLocalVarType() {
042: return localVarType;
043: }
044:
045: public void setLocalVarType(String localVarType) {
046: this .localVarType = localVarType;
047: }
048:
049: public int getLocalVarIndex() {
050: return localVarIndex;
051: }
052:
053: public void setLocalVarIndex(int localVarIndex) {
054: this .localVarIndex = localVarIndex;
055: }
056:
057: private int localVarIndex;
058:
059: public String getOperandName() {
060: return operandName;
061: }
062:
063: public void setOperandName(String operandName) {
064: this .operandName = operandName;
065: }
066:
067: public int getOperandType() {
068: return operandType;
069: }
070:
071: public void setOperandType(int operandType) {
072: this .operandType = operandType;
073: }
074:
075: public java.lang.String getOperandValue() {
076: if (operandValue != null)
077: return operandValue.toString();
078: else
079: return null;
080: }
081:
082: public void setOperandValue(Object operandValue) {
083: this .operandValue = operandValue;
084: }
085:
086: public int getCategory() {
087: return category;
088: }
089:
090: public void setCategory(int category) {
091: this .category = category;
092: }
093:
094: public String getClassType() {
095: return classType;
096: }
097:
098: public void setClassType(String classType) {
099: this .classType = classType;
100: }
101:
102: public java.lang.String toString() {
103: return operandValue.toString();
104: }
105:
106: }
|