1 11 package org.eclipse.jdt.internal.core.util; 12 13 import org.eclipse.jdt.core.util.IConstantPoolEntry; 14 15 20 public class ConstantPoolEntry implements IConstantPoolEntry { 21 22 private int kind; 23 private int classInfoNameIndex; 24 private int classIndex; 25 private int nameAndTypeIndex; 26 private int stringIndex; 27 private char[] stringValue; 28 private int integerValue; 29 private float floatValue; 30 private double doubleValue; 31 private long longValue; 32 private int nameAndTypeDescriptorIndex; 33 private int nameAndTypeNameIndex; 34 private char[] className; 35 private char[] fieldName; 36 private char[] methodName; 37 private char[] fieldDescriptor; 38 private char[] methodDescriptor; 39 private char[] utf8Value; 40 private int utf8Length; 41 private char[] classInfoName; 42 43 public ConstantPoolEntry() { 44 this.classInfoNameIndex = -1; 45 this.classIndex = -1; 46 this.nameAndTypeIndex = -1; 47 this.stringIndex = -1; 48 this.stringValue = null; 49 this.integerValue = -1; 50 this.floatValue = -0.0f; 51 this.doubleValue = -0-0; 52 this.longValue = -1; 53 this.nameAndTypeDescriptorIndex = -1; 54 this.nameAndTypeNameIndex = -1; 55 this.className = null; 56 this.fieldName = null; 57 this.methodName = null; 58 this.fieldDescriptor = null; 59 this.methodDescriptor = null; 60 this.utf8Value = null; 61 this.utf8Length = -1; 62 this.classInfoName = null; 63 } 64 65 68 public int getKind() { 69 return this.kind; 70 } 71 72 76 public void setKind(int kind) { 77 this.kind = kind; 78 } 79 80 83 public int getClassInfoNameIndex() { 84 return this.classInfoNameIndex; 85 } 86 87 90 public int getClassIndex() { 91 return this.classIndex; 92 } 93 94 97 public int getNameAndTypeIndex() { 98 return this.nameAndTypeIndex; 99 } 100 101 104 public int getStringIndex() { 105 return this.stringIndex; 106 } 107 108 111 public String getStringValue() { 112 return new String (this.stringValue); 113 } 114 115 118 public int getIntegerValue() { 119 return this.integerValue; 120 } 121 122 125 public float getFloatValue() { 126 return this.floatValue; 127 } 128 129 132 public double getDoubleValue() { 133 return this.doubleValue; 134 } 135 136 139 public long getLongValue() { 140 return this.longValue; 141 } 142 143 146 public int getNameAndTypeInfoDescriptorIndex() { 147 return this.nameAndTypeDescriptorIndex; 148 } 149 150 153 public int getNameAndTypeInfoNameIndex() { 154 return this.nameAndTypeNameIndex; 155 } 156 157 160 public char[] getClassName() { 161 return this.className; 162 } 163 164 167 public char[] getFieldName() { 168 return this.fieldName; 169 } 170 171 174 public char[] getMethodName() { 175 return this.methodName; 176 } 177 178 181 public char[] getFieldDescriptor() { 182 return this.fieldDescriptor; 183 } 184 185 188 public char[] getMethodDescriptor() { 189 return this.methodDescriptor; 190 } 191 192 195 public char[] getUtf8Value() { 196 return this.utf8Value; 197 } 198 199 202 public char[] getClassInfoName() { 203 return this.classInfoName; 204 } 205 206 210 public void setClassInfoNameIndex(int classInfoNameIndex) { 211 this.classInfoNameIndex = classInfoNameIndex; 212 } 213 214 218 public void setClassIndex(int classIndex) { 219 this.classIndex = classIndex; 220 } 221 222 226 public void setNameAndTypeIndex(int nameAndTypeIndex) { 227 this.nameAndTypeIndex = nameAndTypeIndex; 228 } 229 230 234 public void setStringIndex(int stringIndex) { 235 this.stringIndex = stringIndex; 236 } 237 238 242 public void setStringValue(char[] stringValue) { 243 this.stringValue = stringValue; 244 } 245 246 250 public void setIntegerValue(int integerValue) { 251 this.integerValue = integerValue; 252 } 253 254 258 public void setFloatValue(float floatValue) { 259 this.floatValue = floatValue; 260 } 261 262 266 public void setDoubleValue(double doubleValue) { 267 this.doubleValue = doubleValue; 268 } 269 270 274 public void setLongValue(long longValue) { 275 this.longValue = longValue; 276 } 277 278 282 public int getNameAndTypeDescriptorIndex() { 283 return nameAndTypeDescriptorIndex; 284 } 285 286 290 public void setNameAndTypeDescriptorIndex(int nameAndTypeDescriptorIndex) { 291 this.nameAndTypeDescriptorIndex = nameAndTypeDescriptorIndex; 292 } 293 294 298 public int getNameAndTypeNameIndex() { 299 return nameAndTypeNameIndex; 300 } 301 302 306 public void setNameAndTypeNameIndex(int nameAndTypeNameIndex) { 307 this.nameAndTypeNameIndex = nameAndTypeNameIndex; 308 } 309 310 314 public void setClassName(char[] className) { 315 this.className = className; 316 } 317 318 322 public void setFieldName(char[] fieldName) { 323 this.fieldName = fieldName; 324 } 325 326 330 public void setMethodName(char[] methodName) { 331 this.methodName = methodName; 332 } 333 334 338 public void setFieldDescriptor(char[] fieldDescriptor) { 339 this.fieldDescriptor = fieldDescriptor; 340 } 341 342 346 public void setMethodDescriptor(char[] methodDescriptor) { 347 this.methodDescriptor = methodDescriptor; 348 } 349 350 354 public void setUtf8Value(char[] utf8Value) { 355 this.utf8Value = utf8Value; 356 } 357 358 362 public void setClassInfoName(char[] classInfoName) { 363 this.classInfoName = classInfoName; 364 } 365 366 369 public int getUtf8Length() { 370 return this.utf8Length; 371 } 372 373 377 public void setUtf8Length(int utf8Length) { 378 this.utf8Length = utf8Length; 379 } 380 381 public void reset() { 382 this.kind = 0; 383 this.classInfoNameIndex = 0; 384 this.classIndex = 0; 385 this.nameAndTypeIndex = 0; 386 this.stringIndex = 0; 387 this.stringValue = null; 388 this.integerValue = 0; 389 this.floatValue = 0.0f; 390 this.doubleValue = 0.0; 391 this.longValue = 0L; 392 this.nameAndTypeDescriptorIndex = 0; 393 this.nameAndTypeNameIndex = 0; 394 this.className = null; 395 this.fieldName = null; 396 this.methodName = null; 397 this.fieldDescriptor = null; 398 this.methodDescriptor = null; 399 this.utf8Value = null; 400 this.utf8Length = 0; 401 this.classInfoName = null; 402 } 403 } 404 | Popular Tags |