package de.dhbwstuttgart.strucTypes4.syntaxtree;

import de.dhbwstuttgart.strucTypes4.algo.ConstraintAbstract;
import de.dhbwstuttgart.strucTypes4.typePlaceHolder.TPH;

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

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

    List<Interface> implementedInterfaces;
    Class aClass;
    List<TPH> generics;
    List<ConstraintAbstract> constraints;


    public ClassTyped(List<Interface> implementedInterfaces, Class aClass, List<TPH> generics, List<ConstraintAbstract> constraints) {
        this.implementedInterfaces = implementedInterfaces;
        this.aClass = aClass;
        this.generics = generics;
        this.constraints = constraints;
    }

    // Dummy Konstruktor
    public ClassTyped(String name) {
        this.implementedInterfaces = new ArrayList<>();
        this.aClass = new Class(name,new ArrayList<>(), new ArrayList<>());
        this.generics = new ArrayList<>();
        this.constraints = new ArrayList<>();
    }


    @Override
    public String toString() {
        return String.format( "Class Typed -  \n " +
                "// Interfaces: \n %s \n " +
                "// Generics %s \n " +
                "// Constraints %s \n " +
                "%s  " , implementedInterfaces.toString(), generics.toString() , constraints.toString() , aClass.toString() );
    }


    /*
    public String toCodeTyped() {
        return String.format( "Class Code Typed -  \n " +
                "// Interfaces: \n %s \n " +
                "// Generics %s \n " +
                "// Constraints %s \n " +
                "%s  " , implementedInterfaces.toString(), generics.toString() , constraints.toString() , aClass.toCodeTyped() );
    }
    */





    public List<Interface> getImplementedInterfaces() {
        return implementedInterfaces;
    }

    public void setImplementedInterfaces(List<Interface> implementedInterfaces) {
        this.implementedInterfaces = implementedInterfaces;
    }

    public Class getaClass() {
        return aClass;
    }

    public void setaClass(Class aClass) {
        this.aClass = aClass;
    }

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

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

    public List<ConstraintAbstract> getConstraints() {
        return constraints;
    }

    public void setConstraints(List<ConstraintAbstract> constraints) {
        this.constraints = constraints;
    }
}
