Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Commit

Permalink
Add method beginOverridePublicMethod for ScalaWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
bouil committed Sep 1, 2015
1 parent 1ea7390 commit 6d841dd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/com/mysema/codegen/ScalaWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public class ScalaWriter extends AbstractCodeWriter<ScalaWriter> {

private static final String DEF = "def ";

private static final String OVERRIDE_DEF = "override " + DEF;

private static final String EXTENDS = " extends ";

private static final String WITH = " with ";
Expand Down Expand Up @@ -313,6 +315,17 @@ public ScalaWriter beginPublicMethod(Type returnType, String methodName, Paramet
return beginMethod(DEF, returnType, methodName, args);
}

public <T> ScalaWriter beginOverridePublicMethod(Type returnType, String methodName,
Collection<T> parameters, Function<T, Parameter> transformer)
throws IOException {
return beginMethod(OVERRIDE_DEF, returnType, methodName, transform(parameters, transformer));
}

public ScalaWriter beginOverridePublicMethod(Type returnType, String methodName, Parameter... args)
throws IOException {
return beginMethod(OVERRIDE_DEF, returnType, methodName, args);
}

@Override
public <T> ScalaWriter beginStaticMethod(Type returnType, String methodName,
Collection<T> parameters, Function<T, Parameter> transformer) throws IOException {
Expand Down

0 comments on commit 6d841dd

Please sign in to comment.