// 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);
IcTuple[] ic_stored = computeIcStored(ic_local, ic_relevant);
for (int index = 0; index < ic_stored.length; index++) {
int innerClassIndex = ic_stored[index].thisClassIndex();
int outerClassIndex = ic_stored[index].outerClassIndex();
int simpleClassNameIndex = ic_stored[index].simpleClassNameIndex();
String innerClassString = ic_stored[index].thisClassString();
String outerClassString = ic_stored[index].outerClassString();
String simpleClassName = ic_stored[index].simpleClassName();
CPClass innerClass = null;
CPUTF8 innerName = null;
CPClass outerClass = null;
innerClass = innerClassIndex != -1 ? cpBands
.cpClassValue(innerClassIndex) : cpBands
.cpClassValue(innerClassString);
if (!ic_stored[index].isAnonymous()) {
innerName = simpleClassNameIndex != -1 ? cpBands.cpUTF8Value(
simpleClassNameIndex,
ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ) : cpBands
.cpUTF8Value(simpleClassName,
ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ);
}
if (ic_stored[index].isMember()) {
outerClass = outerClassIndex != -1 ? cpBands
.cpClassValue(outerClassIndex) : cpBands
.cpClassValue(outerClassString);
}
int flags = ic_stored[index].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.