001: /*
002: * FieldRef.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:
020: package net.sf.jdec.constantpool;
021:
022: public class FieldRef {
023:
024: private int classPointer;
025:
026: private int descriptionPointer;
027:
028: private int tag;
029:
030: private int cppos;
031:
032: private java.lang.String classname = null;
033:
034: private java.lang.String typeoffield = null;
035:
036: private ClassInfo classinfo = null;
037:
038: private NameAndType nmtype = null;
039:
040: private java.lang.String fieldName = null;
041:
042: public boolean isBooleanField() {
043: if (typeoffield != null && typeoffield.trim().equals("Z")) {
044: return true;
045: }
046: return false;
047: }
048:
049: public int getCppos() {
050:
051: return cppos;
052:
053: }
054:
055: public void setCppos(int cppos) {
056:
057: this .cppos = cppos;
058:
059: }
060:
061: public int getClassPointer() {
062:
063: return classPointer;
064:
065: }
066:
067: public void setClassPointer(int classPointer) {
068:
069: this .classPointer = classPointer;
070:
071: }
072:
073: public int getDescriptionPointer() {
074:
075: return descriptionPointer;
076:
077: }
078:
079: public void setDescriptionPointer(int descriptionPointer) {
080:
081: this .descriptionPointer = descriptionPointer;
082:
083: }
084:
085: public int getTag() {
086:
087: return tag;
088:
089: }
090:
091: public void setTag(int tag) {
092:
093: this .tag = tag;
094:
095: }
096:
097: public void setClassName(java.lang.String name)
098:
099: {
100:
101: classname = name;
102:
103: }
104:
105: public void setClassRef(ClassInfo cinfo)
106:
107: {
108:
109: this .classinfo = cinfo;
110:
111: }
112:
113: public void setType(java.lang.String name)
114:
115: {
116:
117: this .typeoffield = name;
118:
119: }
120:
121: public void setFieldName(java.lang.String fieldname)
122:
123: {
124:
125: this .fieldName = fieldname;
126:
127: }
128:
129: public void setNameAndTypeRef(NameAndType nmtyperef)
130:
131: {
132:
133: this .nmtype = nmtyperef;
134:
135: }
136:
137: public java.lang.String getFieldName() {
138: return fieldName;
139: }
140:
141: public java.lang.String getTypeoffield() {
142: return typeoffield;
143: }
144:
145: public java.lang.String getClassname() {
146: return classname;
147: }
148:
149: public void setClassname(java.lang.String classname) {
150: this.classname = classname;
151: }
152:
153: }
|