- MethodGen(ClassFile cf, DataInput in, ConstantPool cp, boolean ownerInterface) throws IOException {
- this.cf = cf;
- flags = in.readShort();
- if((flags & ~(PUBLIC|PRIVATE|PROTECTED|STATIC|FINAL|SYNCHRONIZED|NATIVE|ABSTRACT|STRICT)) != 0)
- throw new ClassFile.ClassReadExn("invalid flags");
- this.name = cp.getUtf8KeyByIndex(in.readShort());
- //System.err.println("Processing " + name + "...");
- Type.Class.Method m = cf.getType().method(name+cp.getUtf8KeyByIndex(in.readShort()));
- this.ret = m.returnType;
- this.args = new Type[m.getNumArgs()];
- for(int i=0; i<args.length; i++) args[i] = m.getArgType(i);
+ MethodGen(Type.Class c, DataInput in, ConstantPool cp) throws IOException {
+ this.flags = in.readShort();
+ if ((flags & ~VALID_METHOD_FLAGS) != 0) throw new ClassFile.ClassReadExn("invalid flags");
+ String name = cp.getUtf8KeyByIndex(in.readShort());
+ this.method = c.method(name+cp.getUtf8KeyByIndex(in.readShort()));