package es.uniovi.reflection.patternmining.model;

import java.util.ArrayList;
import java.util.List;

import es.uniovi.reflection.patternmining.category.Others;
import es.uniovi.reflection.patternmining.category.TypeCategory;
import es.uniovi.reflection.patternmining.model.interfaces.ExpressionChild;
import es.uniovi.reflection.patternmining.model.interfaces.ParameterType;
import es.uniovi.reflection.patternmining.model.interfaces.StatementChild;

public class ReturnFeatures {

	private int depth;
	private int numberOfStatements = 0;
	private int methodLocalVars;
	
	private TypeCategory returnType;
	private TypeCategory type;
	
	//typedef
	private int numberOfClasses;
	private int numberOfInterfaces;
	private int numberOfEnums;	
	private boolean parentClass;
	private String methodName;
	private int numberOfTypesInPackages;
	public int getNumberOfTypesInPackages() {
		return numberOfTypesInPackages;
	}

	public void setNumberOfTypesInPackages(int numberOfTypesInPackages) {
		this.numberOfTypesInPackages = numberOfTypesInPackages;
	}

	public int getNumberOfTypesInDefaultPackage() {
		return numberOfTypesInDefaultPackage;
	}

	public void setNumberOfTypesInDefaultPackage(int numberOfTypesInDefaultPackage) {
		this.numberOfTypesInDefaultPackage = numberOfTypesInDefaultPackage;
	}

	private int numberOfTypesInDefaultPackage;
	
	//naming
	private int[] totalsArrayVariableNaming = {0,0,0,0,0};
	
	private ArrayList<StatementChild> statementChild;
	private ArrayList<ExpressionChild> expressionChild;
	
	private ArrayList<Long> statementChildId;
	private ArrayList<Long> expressionChildId;
	
	private int numberOfInnerTypes;
	private int numberOfStaticNestedTypes;
	
	private int numberOfStaticBlocks;
	
	private int numberOfFields;
	private int numberOfStaticFields;
	private int numberOfMethods;
	private int numberOfStaticMethods;
	
	private int numberOfConstructors = 0;
	private int numberOfOverloaded;
	
	private ParameterType methodParameterType = Others.None; 
	private long methodTypeId;

	public int getDownDepth() {
		return depth;
	}

	public void setDepth(int depth) {
		this.depth = depth;
	}

	public int getNumberOfStatements() {
		return numberOfStatements;
	}

	public void setNumberOfStatements(int numberOfStatements) {
		this.numberOfStatements = numberOfStatements;
	}

	public int getMethodLocalVars() {
		return methodLocalVars;
	}

	public void setMethodLocalVars(int methodLocalVars) {
		this.methodLocalVars = methodLocalVars;
	}
	
	public TypeCategory getReturnType() {
		return returnType;
	}

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

	public TypeCategory getType() {
		return type;
	}

	public void setType(TypeCategory type) {
		this.type = type;
	}

	public int getNumberOfClasses() {
		return numberOfClasses;
	}

	public void setNumberOfClasses(int numberOfClasses) {
		this.numberOfClasses = numberOfClasses;
	}

	public int getNumberOfInterfaces() {
		return numberOfInterfaces;
	}

	public void setNumberOfInterfaces(int numberOfInterfaces) {
		this.numberOfInterfaces = numberOfInterfaces;
	}

	public int getNumberOfEnums() {
		return numberOfEnums;
	}

	public void setNumberOfEnums(int numberOfEnums) {
		this.numberOfEnums = numberOfEnums;
	}
	
	public List<StatementChild> getStatementChild() {
	    return new ArrayList<StatementChild>(this.statementChild);   
	}
	
	public void setStatementChild(List<StatementChild> statementChild) {
	    this.statementChild = new ArrayList<StatementChild>(statementChild);
	}
	
	public List<ExpressionChild> getExpressionChild() {
	    return new ArrayList<ExpressionChild>(this.expressionChild);   
	}
	
	public void setExpressionChild(List<ExpressionChild> expressionChild) {
	    this.expressionChild = new ArrayList<ExpressionChild>(expressionChild);
	}
	
	public List<Long> getStatementChildId() {
	    return new ArrayList<Long>(this.statementChildId);   
	}
	
	public void setStatementChildId(List<Long> statementChildId) {
	    this.statementChildId = new ArrayList<Long>(statementChildId);
	}
	
	public List<Long> getExpressionChildId() {
	    return new ArrayList<Long>(this.expressionChildId);   
	}
	
	public void setExpressionChildId(List<Long> expressionChildId) {
	    this.expressionChildId = new ArrayList<Long>(expressionChildId);
	}

	public int[] getTotalsArrayVariableNaming() {
		return totalsArrayVariableNaming;
	}

	public void setTotalsArrayVariableNaming(int i, int value) {
		this.totalsArrayVariableNaming[i] = value;
	}

	public int getNumberOfInnerTypes() {
		return numberOfInnerTypes;
	}

	public void setNumberOfInnerTypes(int numberOfInnerTypes) {
		this.numberOfInnerTypes = numberOfInnerTypes;
	}

	public int getNumberOfStaticNestedTypes() {
		return numberOfStaticNestedTypes;
	}

	public void setNumberOfStaticNestedTypes(int numberOfStaticNestedTypes) {
		this.numberOfStaticNestedTypes = numberOfStaticNestedTypes;
	}

	public int getNumberOfStaticBlocks() {
		return numberOfStaticBlocks;
	}

	public void setNumberOfStaticBlocks(int numberOfStaticBlocks) {
		this.numberOfStaticBlocks = numberOfStaticBlocks;
	}

	public int getNumberOfFields() {
		return numberOfFields;
	}

	public void setNumberOfFields(int numberOfFields) {
		this.numberOfFields = numberOfFields;
	}

	public int getNumberOfStaticFields() {
		return numberOfStaticFields;
	}

	public void setNumberOfStaticFields(int numberOfStaticFields) {
		this.numberOfStaticFields = numberOfStaticFields;
	}

	public int getNumberOfMethods() {
		return numberOfMethods;
	}

	public void setNumberOfMethods(int numberOfMethods) {
		this.numberOfMethods = numberOfMethods;
	}

	public int getNumberOfStaticMethods() {
		return numberOfStaticMethods;
	}

	public void setNumberOfStaticMethods(int numberOfStaticMethods) {
		this.numberOfStaticMethods = numberOfStaticMethods;
	}
	
	public int isNumberOfConstructors() {
		return numberOfConstructors;
	}

	public void setNumberOfConstructors(int numberOfConstructors) {
		this.numberOfConstructors = numberOfConstructors;
	}

	public int getNumberOfOverloaded() {
		return numberOfOverloaded;
	}

	public void setNumberOfOverloaded(int numberOfOverloaded) {
		this.numberOfOverloaded = numberOfOverloaded;
	}

	public int getNumberOfConstructors() {
		return numberOfConstructors;
	}

	public boolean isParentClass() {
		return parentClass;
	}

	public void setParentClass(boolean parentClass) {
		this.parentClass = parentClass;
	}

	public String getMethodName() {
		return methodName;
	}

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

	public ParameterType getMethodParameterType() {
		return methodParameterType;
	}

	public void setMethodParameterType(ParameterType methodParameterType) {
		this.methodParameterType = methodParameterType;
	}

	public long getMethodTypeId() {
		return methodTypeId;
	}

	public void setMethodTypeId(long methodTypeId) {
		this.methodTypeId = methodTypeId;
	}
	
}
