package de.dhbwstuttgart.typecheck;

import de.dhbwstuttgart.parser.SyntaxTreeGenerator.GenericContext;

public class GenericTypeName extends JavaClassName {
    private final static String DELIMITER = "%";

    private final JavaClassName parentClass;
    private final String methodName;

    public GenericTypeName(GenericContext parentClass, String name) {
        super(name);
        this.parentClass = parentClass.parentClass;
        this.methodName = parentClass.parentMethod;
    }

    public String toString(){
        return parentClass.toString()
                + DELIMITER + methodName
                + DELIMITER + super.toString();
    }
}
