class InstallSDE {
static final boolean verbose = true;
byte[] orig;
byte[] sdeAttr;
byte[] gen;
int sdeIndex;
} else {
abort("Usage: <command> <input class file> " +
"<attribute file> <output class file name>\n" +
}
}
throws IOException {
}
if (!inOutClassFile.delete()) {
throw new IOException("inOutClassFile.delete() failed");
}
throw new IOException("tmpFile.renameTo(inOutClassFile) failed");
}
}
}
if (!inClassFile.exists()) {
}
}
// get the bytes
// do it
addSDE();
// write result
}
}
return bytes;
}
int i;
int constantPoolCountPos = genPos;
int constantPoolCount = readU2();
// copy old constant pool return index of SDE symbol, if found
if (sdeIndex < 0) {
// if "SourceDebugExtension" symbol not there add it
// increment the countantPoolCount
if (verbose) {
sdeIndex);
}
} else {
if (verbose) {
sdeIndex);
}
}
int interfaceCount = readU2();
if (verbose) {
}
copyMembers(); // fields
copyMembers(); // methods
int attrCountPos = genPos;
if (verbose) {
}
// copy the class attributes, return true if SDE attr found (not copied)
// we will be adding SDE and it isn't already counted
++attrCount;
if (verbose) {
}
}
}
void copyMembers() {
if (verbose) {
}
for (int i = 0; i < count; ++i) {
if (verbose) {
}
}
}
boolean sdeFound = false;
for (int i = 0; i < attrCount; ++i) {
// don't write old SDE
sdeFound = true;
if (verbose) {
}
} else {
if (verbose) {
}
}
}
return sdeFound;
}
}
}
}
int readU1() {
}
int readU2() {
}
int readU4() {
}
}
}
}
for (int i = 0; i < count; ++i) {
}
}
for (int i = 0; i < count; ++i) {
}
return bytes;
}
}
}
int sdeIndex = -1;
// copy const pool index zero not in class file
for (int i = 1; i < constantPoolCount; ++i) {
switch (tag) {
case 7: // Class
case 8: // String
copy(2);
break;
case 9: // Field
case 10: // Method
case 11: // InterfaceMethod
case 3: // Integer
case 4: // Float
case 12: // NameAndType
copy(4);
break;
case 5: // Long
case 6: // Double
copy(8);
break;
case 1: // Utf8
if (verbose) {
}
sdeIndex = i;
}
break;
default:
break;
}
}
return sdeIndex;
}
void writeUtf8ForSDE() {
for (int i = 0; i < len; ++i) {
}
}
}