// 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);
if (!icStored.isAnonymous()) {
innerName = simpleClassNameIndex != -1 ? cpBands.cpUTF8Value(
simpleClassNameIndex) : cpBands
.cpUTF8Value(simpleClassName);
}
if (icStored.isMember()) {
outerClass = outerClassIndex != -1 ? cpBands
.cpClassValue(outerClassIndex) : cpBands
.cpClassValue(outerClassString);
}
int flags = icStored.F;
innerClassesAttribute.addInnerClassesEntry(innerClass, outerClass,
innerName, flags);
addInnerClassesAttr = true;
}
// If ic_local is sent and it's empty, don't add
// the inner classes attribute.