in src/main/java/org/apache/commons/compress/harmony/pack200/ClassBands.java [1027:1144]
public void removeCurrentClass() {
// Note - this doesn't remove any entries added to the constant pool but
// that shouldn't be a problem
if ((class_flags[index] & 1 << 17) != 0) {
classSourceFile.remove(classSourceFile.size() - 1);
}
if ((class_flags[index] & 1 << 18) != 0) {
classEnclosingMethodClass.remove(classEnclosingMethodClass.size() - 1);
classEnclosingMethodDesc.remove(classEnclosingMethodDesc.size() - 1);
}
if ((class_flags[index] & 1 << 19) != 0) {
classSignature.remove(classSignature.size() - 1);
}
if ((class_flags[index] & 1 << 21) != 0) {
class_RVA_bands.removeLatest();
}
if ((class_flags[index] & 1 << 22) != 0) {
class_RIA_bands.removeLatest();
}
for (final Long flagsL : tempFieldFlags) {
final long flags = flagsL.longValue();
if ((flags & 1 << 19) != 0) {
fieldSignature.remove(fieldSignature.size() - 1);
}
if ((flags & 1 << 17) != 0) {
fieldConstantValueKQ.remove(fieldConstantValueKQ.size() - 1);
}
if ((flags & 1 << 21) != 0) {
field_RVA_bands.removeLatest();
}
if ((flags & 1 << 22) != 0) {
field_RIA_bands.removeLatest();
}
}
for (final Long flagsL : tempMethodFlags) {
final long flags = flagsL.longValue();
if ((flags & 1 << 19) != 0) {
methodSignature.remove(methodSignature.size() - 1);
}
if ((flags & 1 << 18) != 0) {
final int exceptions = methodExceptionNumber.remove(methodExceptionNumber.size() - 1);
for (int i = 0; i < exceptions; i++) {
methodExceptionClasses.remove(methodExceptionClasses.size() - 1);
}
}
if ((flags & 1 << 17) != 0) { // has code attribute
codeMaxLocals.remove(codeMaxLocals.size() - 1);
codeMaxStack.remove(codeMaxStack.size() - 1);
final int handlers = codeHandlerCount.remove(codeHandlerCount.size() - 1);
for (int i = 0; i < handlers; i++) {
final int index = codeHandlerStartP.size() - 1;
codeHandlerStartP.remove(index);
codeHandlerEndPO.remove(index);
codeHandlerCatchPO.remove(index);
codeHandlerClass.remove(index);
}
if (!stripDebug) {
final long cdeFlags = codeFlags.remove(codeFlags.size() - 1).longValue();
final int numLocalVariables = codeLocalVariableTableN.remove(codeLocalVariableTableN.size() - 1);
for (int i = 0; i < numLocalVariables; i++) {
final int location = codeLocalVariableTableBciP.size() - 1;
codeLocalVariableTableBciP.remove(location);
codeLocalVariableTableSpanO.remove(location);
codeLocalVariableTableNameRU.remove(location);
codeLocalVariableTableTypeRS.remove(location);
codeLocalVariableTableSlot.remove(location);
}
if ((cdeFlags & 1 << 3) != 0) {
final int numLocalVariablesInTypeTable = codeLocalVariableTypeTableN.remove(codeLocalVariableTypeTableN.size() - 1);
for (int i = 0; i < numLocalVariablesInTypeTable; i++) {
final int location = codeLocalVariableTypeTableBciP.size() - 1;
codeLocalVariableTypeTableBciP.remove(location);
codeLocalVariableTypeTableSpanO.remove(location);
codeLocalVariableTypeTableNameRU.remove(location);
codeLocalVariableTypeTableTypeRS.remove(location);
codeLocalVariableTypeTableSlot.remove(location);
}
}
if ((cdeFlags & 1 << 1) != 0) {
final int numLineNumbers = codeLineNumberTableN.remove(codeLineNumberTableN.size() - 1);
for (int i = 0; i < numLineNumbers; i++) {
final int location = codeLineNumberTableBciP.size() - 1;
codeLineNumberTableBciP.remove(location);
codeLineNumberTableLine.remove(location);
}
}
}
}
if ((flags & 1 << 21) != 0) {
method_RVA_bands.removeLatest();
}
if ((flags & 1 << 22) != 0) {
method_RIA_bands.removeLatest();
}
if ((flags & 1 << 23) != 0) {
method_RVPA_bands.removeLatest();
}
if ((flags & 1 << 24) != 0) {
method_RIPA_bands.removeLatest();
}
if ((flags & 1 << 25) != 0) {
method_AD_bands.removeLatest();
}
}
class_this[index] = null;
class_super[index] = null;
class_interface_count[index] = 0;
class_interface[index] = null;
major_versions[index] = 0;
class_flags[index] = 0;
tempFieldDesc.clear();
tempFieldFlags.clear();
tempMethodDesc.clear();
tempMethodFlags.clear();
if (index > 0) {
index--;
}
}