package de.dhbwstuttgart.strucTypes4.syntaxtree;


import de.dhbwstuttgart.strucTypes4.typeVars.TypeVarAbstract;

import java.util.List;


/**
 * Created by sebastian on 09.04.17.
 */
public class Interface {

    TypeVarAbstract strucType;
    List<FieldInterface> fields;
    List<MethodInterface> methods;
    List<TypeVarAbstract> generics;


    public Interface(TypeVarAbstract strucType, List<FieldInterface> fields, List<MethodInterface> methods, List<TypeVarAbstract> generics) {
        this.strucType = strucType;
        this.fields = fields;
        this.methods = methods;
        this.generics = generics;
    }

    public List<FieldInterface> getFields() {
        return fields;
    }

    public void setFields(List<FieldInterface> fields) {
        this.fields = fields;
    }

    public List<MethodInterface> getMethods() {
        return methods;
    }

    public void setMethods(List<MethodInterface> methods) {
        this.methods = methods;
    }

    public List<TypeVarAbstract> getGenerics() {
        return generics;
    }

    public void setGenerics(List<TypeVarAbstract> generics) {
        this.generics = generics;
    }

    @Override
    public String toString() {
        return String.format("interface %s < %s >  { \n %s \n %s } \n \n " , strucType , generics, fields.toString() , methods.toString());
    }




}
