// Path: src/java/minijava/ast/Type.java
// public abstract class Type extends AST {
// 	
// 	@Override
// 	public abstract boolean equals(Object other);
// 
// }
// 
// Path: src/java/minijava/util/ImpTable.java
// public class ImpTable<V> extends DefaultIndentable 
// implements Iterable<Entry<String, V>>, Lookup<V>
// {
// 	
// 	public static class DuplicateException extends Exception {
// 
// 		private static final long serialVersionUID = 8650830167061316305L;
// 
// 		public DuplicateException(String arg0) {
// 			super(arg0);
// 		}
// 
// 	}
// 
// 	private Map<String, V> map = new HashMap<String, V>();
// 
// 	@Override
// 	public Iterator<Entry<String,V>> iterator() {
// 		return map.entrySet().iterator();
// 	}
// 	
// 	/**
// 	 * Insert an entry into the table. This modifies the table.
// 	 * Duplicate entries (i.e. with the same id are not supported).
// 	 * When a duplicate id is being entered a DuplicatException is
// 	 * thrown.
// 	 * <p>
// 	 * Note: the name "put" different from the name "insert" in the
// 	 * FunTable is deliberate. This will make sure you get compile
// 	 * errors when you try to change code using imperative puts
// 	 * to use functional inserts instead.
// 	 */
// 	public void put(String id, V value) throws DuplicateException {
// 		Assert.assertNotNull(value);
// 		Assert.assertNotNull(id);
// 		V existing = map.get(id);
// 		if (existing!=null) throw new DuplicateException("Duplicate entry: "+id);
// 		map.put(id, value);
// 	}
// 	
// 	/**
// 	 * Find an entry in the table. If no entry is found, null is returned.
// 	 */
// 	public V lookup(String id) {
// 		return map.get(id);
// 	}
// 
// 	@Override
// 	public void dump(IndentingWriter out) {
// 		out.println("Table {");
// 		out.indent();
// 		for (Entry<String, V> entry : this) {
// 			out.print(entry.getKey()+" = ");
// 			out.println(entry.getValue());
// 		}
// 		out.outdent();
// 		out.print("}");
// 	}
// 
// 	public boolean isEmpty() {
// 		return size()==0;
// 	}
// 
// 	@Override
// 	public int size() {
// 		return map.size();
// 	}
// 
// }
// 
// Path: src/java/minijava/util/Indentable.java
// public interface Indentable {
// 	
// 	void dump(IndentingWriter out);
// 
// }
// 
// Path: src/java/minijava/util/IndentingWriter.java
// public class IndentingWriter {
// 
// 	/**
// 	 * Current level of indentation.
// 	 */
// 	private int indentation = 0;
// 	
// 	/**
// 	 * This flag is true until we have printed something on a line.
// 	 * We use this to postpone printing of indentation spaces until something is
// 	 * actually printed on a line. This allows indentation level to be changed
// 	 * even after a newline has already been printed.
// 	 * => flag replaced by col field that keeps track of the current column
// 	 */
// 	private boolean startOfLine = true;
// 	
// 	/**
// 	 * Where to send the actual output to.
// 	 */
// 	private PrintWriter out;
// 
// 	private int col = 0;
// 	
// 	public IndentingWriter(PrintWriter out) {
// 		this.out = out;
// 	}
// 	
// 	public IndentingWriter(Writer out) {
// 		this(new PrintWriter(out));
// 	}
// 	
// 	public IndentingWriter(OutputStream out) {
// 		this(new OutputStreamWriter(out));
// 	}
// 
// 	public IndentingWriter(File out) throws IOException {
// 		this(new BufferedWriter(new FileWriter(out)));
// 	}
// 
// 	/**
// 	 * Close the wrapped PrintWriter.
// 	 */
// 	public void close() {
// 		out.close();
// 	}
// 	
// 	public void print(String string) {
// 		if (startOfLine) {
// 			startOfLine = false;
// 			for (int i = 0; i < indentation; i++) {
// 				print("   ");
// 			}
// 		}
// 		out.print(string);
// 		col += string.length();
// 	}
// 	public void println() {
// 		out.println();
// 		startOfLine = true;
// 		col = 0;
// 	}
// 
// 	/**
// 	 * Write an object to this IndentableWriter. If the object implements
// 	 * Indentable, then that implementation will be used. Otherwise we fall back
// 	 * on the object's toString method.
// 	 */
// 	public void print(Object obj) {
// 		if (obj instanceof Indentable) {
// 			Indentable iObj = (Indentable) obj;
// 			iObj.dump(this);
// 		}
// 		else {
// 			this.print(""+obj);
// 		}
// 	}
// 
// 	public void println(Object obj) {
// 		print(obj);
// 		println();
// 	}
// 
// 	public void indent() {
// 		indentation++;
// 	}
// 	public void outdent() {
// 		indentation--;
// 	}
// 	
// 	public void tabTo(int toCol) {
// 		while (col<toCol)
// 			print(" ");
// 	}
// 
// }


import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;
import minijava.ast.Type;
import minijava.util.ImpTable;
import minijava.util.Indentable;
import minijava.util.IndentingWriter;
package minijava.typechecker.implementation;



public class MethodEntry implements Indentable {
	ClassEntry parent; 
	public ClassEntry getParent() {
		return parent;
	}
	List<Type> paramTypes = new ArrayList<Type>();
	ImpTable<Type> variables;
	ImpTable<Type> parameters;
	Type returnType;
	
	public MethodEntry(ClassEntry parent) {
		this.parent = parent;
// Path: src/java/minijava/ast/Type.java
// public abstract class Type extends AST {
// 	
// 	@Override
// 	public abstract boolean equals(Object other);
// 
// }
// 
// Path: src/java/minijava/util/ImpTable.java
// public class ImpTable<V> extends DefaultIndentable 
// implements Iterable<Entry<String, V>>, Lookup<V>
// {
// 	
// 	public static class DuplicateException extends Exception {
// 
// 		private static final long serialVersionUID = 8650830167061316305L;
// 
// 		public DuplicateException(String arg0) {
// 			super(arg0);
// 		}
// 
// 	}
// 
// 	private Map<String, V> map = new HashMap<String, V>();
// 
// 	@Override
// 	public Iterator<Entry<String,V>> iterator() {
// 		return map.entrySet().iterator();
// 	}
// 	
// 	/**
// 	 * Insert an entry into the table. This modifies the table.
// 	 * Duplicate entries (i.e. with the same id are not supported).
// 	 * When a duplicate id is being entered a DuplicatException is
// 	 * thrown.
// 	 * <p>
// 	 * Note: the name "put" different from the name "insert" in the
// 	 * FunTable is deliberate. This will make sure you get compile
// 	 * errors when you try to change code using imperative puts
// 	 * to use functional inserts instead.
// 	 */
// 	public void put(String id, V value) throws DuplicateException {
// 		Assert.assertNotNull(value);
// 		Assert.assertNotNull(id);
// 		V existing = map.get(id);
// 		if (existing!=null) throw new DuplicateException("Duplicate entry: "+id);
// 		map.put(id, value);
// 	}
// 	
// 	/**
// 	 * Find an entry in the table. If no entry is found, null is returned.
// 	 */
// 	public V lookup(String id) {
// 		return map.get(id);
// 	}
// 
// 	@Override
// 	public void dump(IndentingWriter out) {
// 		out.println("Table {");
// 		out.indent();
// 		for (Entry<String, V> entry : this) {
// 			out.print(entry.getKey()+" = ");
// 			out.println(entry.getValue());
// 		}
// 		out.outdent();
// 		out.print("}");
// 	}
// 
// 	public boolean isEmpty() {
// 		return size()==0;
// 	}
// 
// 	@Override
// 	public int size() {
// 		return map.size();
// 	}
// 
// }
// 
// Path: src/java/minijava/util/Indentable.java
// public interface Indentable {
// 	
// 	void dump(IndentingWriter out);
// 
// }
// 
// Path: src/java/minijava/util/IndentingWriter.java
// public class IndentingWriter {
// 
// 	/**
// 	 * Current level of indentation.
// 	 */
// 	private int indentation = 0;
// 	
// 	/**
// 	 * This flag is true until we have printed something on a line.
// 	 * We use this to postpone printing of indentation spaces until something is
// 	 * actually printed on a line. This allows indentation level to be changed
// 	 * even after a newline has already been printed.
// 	 * => flag replaced by col field that keeps track of the current column
// 	 */
// 	private boolean startOfLine = true;
// 	
// 	/**
// 	 * Where to send the actual output to.
// 	 */
// 	private PrintWriter out;
// 
// 	private int col = 0;
// 	
// 	public IndentingWriter(PrintWriter out) {
// 		this.out = out;
// 	}
// 	
// 	public IndentingWriter(Writer out) {
// 		this(new PrintWriter(out));
// 	}
// 	
// 	public IndentingWriter(OutputStream out) {
// 		this(new OutputStreamWriter(out));
// 	}
// 
// 	public IndentingWriter(File out) throws IOException {
// 		this(new BufferedWriter(new FileWriter(out)));
// 	}
// 
// 	/**
// 	 * Close the wrapped PrintWriter.
// 	 */
// 	public void close() {
// 		out.close();
// 	}
// 	
// 	public void print(String string) {
// 		if (startOfLine) {
// 			startOfLine = false;
// 			for (int i = 0; i < indentation; i++) {
// 				print("   ");
// 			}
// 		}
// 		out.print(string);
// 		col += string.length();
// 	}
// 	public void println() {
// 		out.println();
// 		startOfLine = true;
// 		col = 0;
// 	}
// 
// 	/**
// 	 * Write an object to this IndentableWriter. If the object implements
// 	 * Indentable, then that implementation will be used. Otherwise we fall back
// 	 * on the object's toString method.
// 	 */
// 	public void print(Object obj) {
// 		if (obj instanceof Indentable) {
// 			Indentable iObj = (Indentable) obj;
// 			iObj.dump(this);
// 		}
// 		else {
// 			this.print(""+obj);
// 		}
// 	}
// 
// 	public void println(Object obj) {
// 		print(obj);
// 		println();
// 	}
// 
// 	public void indent() {
// 		indentation++;
// 	}
// 	public void outdent() {
// 		indentation--;
// 	}
// 	
// 	public void tabTo(int toCol) {
// 		while (col<toCol)
// 			print(" ");
// 	}
// 
// }


// Path: src/java/minijava/typechecker/implementation/MethodEntry.java
import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;
import minijava.ast.Type;
import minijava.util.ImpTable;
import minijava.util.Indentable;
import minijava.util.IndentingWriter;

package minijava.typechecker.implementation;



public class MethodEntry implements Indentable {
	ClassEntry parent; 
	public ClassEntry getParent() {
		return parent;
	}
	List<Type> paramTypes = new ArrayList<Type>();
	ImpTable<Type> variables;
	ImpTable<Type> parameters;
	Type returnType;
	
	public MethodEntry(ClassEntry parent) {
		this.parent = parent;
		variables = new ImpTable<Type>();