Lines Matching refs:index

41  *  Entry are referenced using index that can be get
96 /** Report the tag at the given index in the constant pool. */
97 public byte getTag(int index) {
98 return outer.getTag(index);
101 /** Report the current patch at the given index of the constant pool.
103 * To observe the unpatched entry at the given index, use
106 public Object getPatch(int index) {
107 Object value = patchArray[index];
109 switch (getTag(index)) {
130 public void clear(int index) {
131 patchArray[index] = null;
171 public void visitUTF8(int index, byte tag, String utf8) {
172 putUTF8(index, utf8Map.get(utf8));
177 public void visitConstantValue(int index, byte tag, Object value) {
178 putConstantValue(index, tag, valueMap.get(value));
183 public void visitConstantString(int index, byte tag, String name, int nameIndex) {
185 putConstantValue(index, tag, classMap.get(name));
189 visitConstantValue(index, tag, name);
204 void show(int index, byte tag, Object value) {
205 if (index < startIndex || index >= endIndex) return;
207 cpArray[index - startIndex] = value;
211 public void visitUTF8(int index, byte tag, String utf8) {
212 show(index, tag, utf8);
216 public void visitConstantValue(int index, byte tag, Object value) {
218 show(index, tag, value);
222 public void visitConstantString(int index, byte tag,
224 show(index, tag, value);
228 public void visitMemberRef(int index, byte tag,
232 show(index, tag, new String[]{ className, memberName, signature });
236 public void visitDescriptor(int index, byte tag,
239 show(index, tag, new String[]{ memberName, signature });
271 private void checkTag(int index, byte putTag) {
272 byte tag = outer.tags[index];
277 + " at index " + index + " found " + tagName(tag));
280 private void checkTagMask(int index, int tagBitMask) {
281 byte tag = outer.tags[index];
286 + " at index " + index + " found " + tagName(tag));
294 /** Set the entry of the constant pool indexed by index to
297 * @param index an index to a constant pool entry containing a
303 public void putUTF8(int index, String utf8) {
304 if (utf8 == null) { clear(index); return; }
305 checkTag(index, CONSTANT_Utf8);
306 patchArray[index] = utf8;
309 /** Set the entry of the constant pool indexed by index to
312 * @param index an index to a constant pool entry containing a
329 public void putConstantValue(int index, Object value) {
330 if (value == null) { clear(index); return; }
333 checkTag(index, tag);
334 patchArray[index] = value;
337 /** Set the entry of the constant pool indexed by index to
340 * @param index an index to a constant pool entry matching the given tag
357 public void putConstantValue(int index, byte tag, Object value) {
358 if (value == null) { clear(index); return; }
359 checkTag(index, tag);
368 checkTag(index, tag);
369 patchArray[index] = value;
372 /** Set the entry of the constant pool indexed by index to
375 * @param index an index to a constant pool entry containing a
383 public void putDescriptor(int index, String memberName, String signature) {
384 checkTag(index, CONSTANT_NameAndType);
386 patchArray[index] = addSemis(memberName, signature);
389 /** Set the entry of the constant pool indexed by index to
394 * @param index an index to a constant pool entry containing a member reference
403 public void putMemberRef(int index, byte tag,
406 checkTag(index, tag);
411 patchArray[index] = addSemis(className, memberName, signature);