|
|
@ -154,16 +154,12 @@ public class FieldIdentifier extends Identifier{ |
|
|
|
nameIndex = gcp.putUTF(getAlias()); |
|
|
|
nameIndex = gcp.putUTF(getAlias()); |
|
|
|
descriptorIndex = gcp.putUTF(clazz.bundle.getTypeAlias(getType())); |
|
|
|
descriptorIndex = gcp.putUTF(clazz.bundle.getTypeAlias(getType())); |
|
|
|
constvalIndex = 0; |
|
|
|
constvalIndex = 0; |
|
|
|
AttributeInfo attribute = info.findAttribute("ConstantValue"); |
|
|
|
if (info.getConstant() != null) { |
|
|
|
if (attribute != null) { |
|
|
|
|
|
|
|
byte[] contents = attribute.getContents(); |
|
|
|
|
|
|
|
if (contents.length != 2) |
|
|
|
|
|
|
|
throw new ClassFormatError("ConstantValue attribute" |
|
|
|
|
|
|
|
+ " has wrong length"); |
|
|
|
|
|
|
|
int index = (contents[0] & 0xff) << 8 | (contents[1] & 0xff); |
|
|
|
|
|
|
|
constvalIndex = gcp.putUTF("ConstantValue"); |
|
|
|
constvalIndex = gcp.putUTF("ConstantValue"); |
|
|
|
constvalcontentIndex = |
|
|
|
if (info.getType().stackSize() == 2) |
|
|
|
gcp.copyConstant(clazz.info.getConstantPool(), index); |
|
|
|
constvalcontentIndex = gcp.putLongConstant(info.getConstant()); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
constvalcontentIndex = gcp.putConstant(info.getConstant()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|