- FieldGen(DataInput in, ConstantPool cp) throws IOException {
- flags = in.readShort();
- if((flags & ~VALID_FIELD_FLAGS) != 0)
- throw new ClassFile.ClassReadExn("invalid flags");
- name = cp.getUtf8KeyByIndex(in.readShort());
- type = Type.instance(cp.getUtf8KeyByIndex(in.readShort()));
- attrs = new ClassFile.AttrGen(in,cp);
+ FieldGen(Type.Class c, DataInput in, ConstantPool cp) throws IOException {
+ this(in.readShort(),
+ c.field(cp.getUtf8KeyByIndex(in.readShort()),
+ Type.fromDescriptor(cp.getUtf8KeyByIndex(in.readShort()))),
+ new ClassFile.AttrGen(in, cp));