- FieldGen(ClassGen owner, String name, Type type, int flags) {
- if((flags & ~(ACC_PUBLIC|ACC_PRIVATE|ACC_PROTECTED|ACC_VOLATILE|ACC_TRANSIENT|ACC_STATIC|ACC_FINAL)) != 0)
- throw new IllegalArgumentException("invalid flags");
- this.cp = owner.cp;
- this.name = name;
- this.type = type;
- this.flags = flags;
- this.attrs = new ClassGen.AttrGen(cp);
-
- cp.addUtf8(name);
- cp.addUtf8(type.getDescriptor());
- }
+ private FieldGen(int flags, Type.Class.Field field, ClassFile.AttrGen attrs) { this(field, flags, attrs); }
+ FieldGen(Type.Class.Field field, int flags) { this(field, flags, new ClassFile.AttrGen()); }
+ FieldGen(Type.Class.Field field, int flags, ClassFile.AttrGen attrs) { field.super(flags, attrs); }