package ovm.core.domain;
import ovm.core.repository.Attribute;
import ovm.core.repository.ExceptionHandler;

/**
 * This class is part of a refactoring of the ByteCodeFragment
 * class proposed by Christian.
 **/
public interface Code {

    interface Kind {
    }
 
    public Method getMethod();
    public byte[] getBytes(); 
    public Kind getKind();

    public Attribute[] getAttributes();
    public int getLineNumber(int pc);
    public ExceptionHandler[] getExceptionHandlers();

    /**
     * Substitute this piece of code with the equivalent
     * piece of code specified.
     *
     * @param c c.getKind() == getKind() and c.getMethod() == getMethod() are guaranteed
     */
    public void bang(Code c);

} // end of Code
