package de.dhbwstuttgart.target.tree; import de.dhbwstuttgart.target.tree.expression.TargetPattern; import de.dhbwstuttgart.target.tree.expression.TargetTypePattern; import de.dhbwstuttgart.target.tree.type.TargetType; public record MethodParameter(TargetPattern pattern) { public MethodParameter(TargetType type, String name) { this(new TargetTypePattern(type, name)); } public MethodParameter withType(TargetType type) { return new MethodParameter(pattern.withType(type)); } }