package de.dhbwstuttgart.strucTypes3;

import java.util.List;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;


public class MethodConstraint extends ConstraintAbstract {
	
	/* Der MethodConstraint
	 * constraint( typ_receiver, methodname, arguments_typen ( return_type , typvar von argumenttypen )  
	 */
	
	private RefTypeOrTPHOrWildcardOrGeneric receiver; 
	private String methodName; 
	private List<RefTypeOrTPHOrWildcardOrGeneric> argumentTypes; 
	private RefTypeOrTPHOrWildcardOrGeneric returnType; 
	private List<MyTypeVar> argumentTypeVars;
	
	public MethodConstraint(RefTypeOrTPHOrWildcardOrGeneric receiver, String methodName,
			List<RefTypeOrTPHOrWildcardOrGeneric> argumentTypes, RefTypeOrTPHOrWildcardOrGeneric returnType,
			List<MyTypeVar> argumentTypeVars) {
		super();
		this.receiver = receiver;
		this.methodName = methodName;
		this.argumentTypes = argumentTypes;
		this.returnType = returnType;
		this.argumentTypeVars = argumentTypeVars;
	}
	
	
	
	
	public RefTypeOrTPHOrWildcardOrGeneric getReceiver() {
		return receiver;
	}




	public void setReceiver(RefTypeOrTPHOrWildcardOrGeneric receiver) {
		this.receiver = receiver;
	}




	public String getMethodName() {
		return methodName;
	}




	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}




	public List<RefTypeOrTPHOrWildcardOrGeneric> getArgumentTypes() {
		return argumentTypes;
	}




	public void setArgumentTypes(List<RefTypeOrTPHOrWildcardOrGeneric> argumentTypes) {
		this.argumentTypes = argumentTypes;
	}




	public RefTypeOrTPHOrWildcardOrGeneric getReturnType() {
		return returnType;
	}




	public void setReturnType(RefTypeOrTPHOrWildcardOrGeneric returnType) {
		this.returnType = returnType;
	}




	public List<MyTypeVar> getArgumentTypeVars() {
		return argumentTypeVars;
	}




	public void setArgumentTypeVars(List<MyTypeVar> argumentTypeVars) {
		this.argumentTypeVars = argumentTypeVars;
	}

	public String toString() {
		return String.format("MethodConstraint( %s, %s , %s (%s , %s ))" , receiver.toString() , methodName, argumentTypes.toString() , returnType.toString() , argumentTypeVars.toString() );  

	}	
}