// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3) space 
// Source File Name:   MethodBuilder.java

package lt.monarch.jasm;

import java.io.DataOutputStream;
import java.io.IOException;

// Referenced classes of package lt.monarch.jasm:
//            ConstantPool, CodeArray

public class MethodBuilder
{

    public void setName(String s, String s1)
    {
        name = s;
        descriptor = s1;
    }

    public String getName()
    {
        return name;
    }

    public String getDescriptor()
    {
        return descriptor;
    }

    public void setFlags(int i)
    {
        flags = i;
    }

    public int getFlags()
    {
        return flags;
    }

    public void writeMethodImage(DataOutputStream dataoutputstream)
        throws IOException
    {
        dataoutputstream.writeShort(flags);
        dataoutputstream.writeShort(constantPool.defineUTF8(name));
        dataoutputstream.writeShort(constantPool.defineUTF8(descriptor));
        dataoutputstream.writeShort(1);
        dataoutputstream.writeShort(constantPool.defineUTF8("Code"));
        code.writeTo(dataoutputstream);
    }

    public MethodBuilder(ConstantPool constantpool)
    {
        constantPool = constantpool;
        code = new CodeArray();
        name = "execute";
        descriptor = "()V";
        flags = 17;
    }

    public ConstantPool constantPool;
    public CodeArray code;
    int flags;
    String name;
    String descriptor;
}
