Esempio n. 1
0
 private void renameType(int pos, int index) {
   String name = cpool.getUtf8Info(index);
   String newName = Descriptor.rename(name, classnames);
   if (!name.equals(newName)) {
     int index2 = cpool.addUtf8Info(newName);
     ByteArray.write16bit(index2, info, pos);
   }
 }
Esempio n. 2
0
 final int memberValue(int pos) throws Exception {
   int tag = info[pos] & 0xff;
   if (tag == 'e') {
     int typeNameIndex = ByteArray.readU16bit(info, pos + 1);
     int constNameIndex = ByteArray.readU16bit(info, pos + 3);
     enumMemberValue(pos, typeNameIndex, constNameIndex);
     return pos + 5;
   } else if (tag == 'c') {
     int index = ByteArray.readU16bit(info, pos + 1);
     classMemberValue(pos, index);
     return pos + 3;
   } else if (tag == '@') return annotationMemberValue(pos + 1);
   else if (tag == '[') {
     int num = ByteArray.readU16bit(info, pos + 1);
     return arrayMemberValue(pos + 3, num);
   } else { // primitive types or String.
     int index = ByteArray.readU16bit(info, pos + 1);
     constValueMember(tag, index);
     return pos + 3;
   }
 }
Esempio n. 3
0
 final int memberValuePair(int pos) throws Exception {
   int nameIndex = ByteArray.readU16bit(info, pos);
   return memberValuePair(pos + 2, nameIndex);
 }
Esempio n. 4
0
 final int annotation(int pos) throws Exception {
   int type = ByteArray.readU16bit(info, pos);
   int numPairs = ByteArray.readU16bit(info, pos + 2);
   return annotation(pos + 4, type, numPairs);
 }
Esempio n. 5
0
 final int annotationArray(int pos) throws Exception {
   int num = ByteArray.readU16bit(info, pos);
   return annotationArray(pos + 2, num);
 }
Esempio n. 6
0
 /** Returns <code>num_annotations</code>. */
 public int numAnnotations() {
   return ByteArray.readU16bit(info, 0);
 }