// fieldDescr and fieldFlags used to create this
for (i = 0; i < cfFields.length; i++) {
int descriptorIndex = classBands.getFieldDescrInts()[classNum][i];
int nameIndex = cpBands.getCpDescriptorNameInts()[descriptorIndex];
int typeIndex = cpBands.getCpDescriptorTypeInts()[descriptorIndex];
CPUTF8 name = cpBands.cpUTF8Value(nameIndex);
CPUTF8 descriptor = cpBands.cpSignatureValue(typeIndex);
cfFields[i] = cp.add(new CPField(name, descriptor, classBands
.getFieldFlags()[classNum][i], classBands
.getFieldAttributes()[classNum][i]));
}
// add methods
ClassFileEntry cfMethods[] = new ClassFileEntry[classBands
.getClassMethodCount()[classNum]];
// methodDescr and methodFlags used to create this
for (i = 0; i < cfMethods.length; i++) {
int descriptorIndex = classBands.getMethodDescrInts()[classNum][i];
// int colon = descriptorStr.indexOf(':');
int nameIndex = cpBands.getCpDescriptorNameInts()[descriptorIndex];
int typeIndex = cpBands.getCpDescriptorTypeInts()[descriptorIndex];
CPUTF8 name = cpBands.cpUTF8Value(nameIndex);
CPUTF8 descriptor = cpBands.cpSignatureValue(typeIndex);
cfMethods[i] = cp.add(new CPMethod(name, descriptor, classBands
.getMethodFlags()[classNum][i], classBands
.getMethodAttributes()[classNum][i]));
}
cp.addNestedEntries();
// add inner class attribute (if required)
boolean addInnerClassesAttr = false;
IcTuple[] ic_local = getClassBands().getIcLocal()[classNum];
boolean ic_local_sent = ic_local != null;
InnerClassesAttribute innerClassesAttribute = new InnerClassesAttribute(
"InnerClasses");
IcTuple[] ic_relevant = getIcBands().getRelevantIcTuples(fullName, cp);
List ic_stored = computeIcStored(ic_local, ic_relevant);
for (int index = 0; index < ic_stored.size(); index++) {
IcTuple icStored = (IcTuple)ic_stored.get(index);
int innerClassIndex = icStored.thisClassIndex();
int outerClassIndex = icStored.outerClassIndex();
int simpleClassNameIndex = icStored.simpleClassNameIndex();
String innerClassString = icStored.thisClassString();
String outerClassString = icStored.outerClassString();
String simpleClassName = icStored.simpleClassName();
CPClass innerClass = null;
CPUTF8 innerName = null;
CPClass outerClass = null;
innerClass = innerClassIndex != -1 ? cpBands
.cpClassValue(innerClassIndex) : cpBands
.cpClassValue(innerClassString);