package de.dhbwstuttgart.syntaxtree; import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric; import org.antlr.v4.runtime.Token; public class FormalParameter extends Pattern { private String name; public FormalParameter(String name, RefTypeOrTPHOrWildcardOrGeneric type, Token offset) { super(type, offset); this.name = name; } public String getName() { return name; } @Override public void accept(ASTVisitor visitor) { visitor.visit(this); } @Override public FormalParameter withType(RefTypeOrTPHOrWildcardOrGeneric type) { return new FormalParameter(name, type, getOffset()); } }