コード例 #1
0
ファイル: AnnotationsAttribute.java プロジェクト: masonmei/mx
 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);
   }
 }
コード例 #2
0
ファイル: AnnotationsAttribute.java プロジェクト: masonmei/mx
 /**
  * Copies a constant pool entry into the destination constant pool and returns the index of the
  * copied entry. That entry must be a Utf8Info representing a class name in the L<class name>;
  * form.
  *
  * @param srcIndex the index of the copied entry into the source constant pool.
  * @return the index of the copied item into the destination constant pool.
  */
 int copyType(int srcIndex) {
   String name = srcPool.getUtf8Info(srcIndex);
   String newName = Descriptor.rename(name, classnames);
   return destPool.addUtf8Info(newName);
 }