2024-05-02 23:04:07 +02:00

15 lines
513 B
Java

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));
}
}