package de.dhbwstuttgart.strucTypes;

import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
import de.dhbwstuttgart.syntaxtree.Field;

public class AS_Field extends AS_Abstract {
	
	private ClassOrInterface cl; 
	private Field field; 
	private TV_Field tv_field; 
	
	public AS_Field (ClassOrInterface cl, Field field) {
		super(); 
		this.cl = cl; 
		this.field = field; 		
		this.tv_field = new TV_Field(cl,field); 
		
	}
	
	public Field get_Field() {
		return field; 
	}
	
	
	public String get_code() {
		return String.format("%s : %s", tv_field.toString() , field.getName()  ); 
	}
	
	public TV_Field get_TV_Field() {
		return this.tv_field; 
	}
		
	
	public String toString() {
		String klname = cl.getClassName().toString();		
		return String.format( "Assumption: { %s.%s   :   %s  } " , klname, field.getName() , tv_field.toString()  ); 
	}
	
	
	
	
	
	

}
