Skip to content

Commit

Permalink
Merge pull request #309 from Erwan56/master
Browse files Browse the repository at this point in the history
Add useVarArgs option in mvn-scalaxb
  • Loading branch information
eed3si9n committed Feb 20, 2015
2 parents d890a1c + e880081 commit d502f33
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/src/main/scala/scalaxb/compiler/Main.scala
Expand Up @@ -116,8 +116,8 @@ object Arguments {
verbose = true
c
}
opt[Unit]("use-varargs") text("use var arguments") action { (_, c) =>
c.copy(useVarArg = true) }
opt[Boolean]("use-varargs") text("use var arguments") action { (x, c) =>
c.copy(useVarArg = x) }
opt[Unit]("generate-lens") text("Generate lenses") action { (_, c) =>
c.copy(generateLens = true) }
help("help") text("display this message")
Expand Down
Expand Up @@ -267,6 +267,11 @@ public File getOutputDirectory() {
@Parameter
private boolean generateLens;

/**
* Generate case class repeated parameters as varargs if true or Seq if false
*/
@Parameter(defaultValue = "true")
private boolean useVarArgs;
/**
* Returns the command line options to be used for scalaxb, excluding the
* input file names.
Expand All @@ -291,6 +296,7 @@ protected List<String> arguments() {
.flag("--blocking", !async)
.flag("--lax-any", laxAny)
.flag("--generate-lens", generateLens)
.flag("--use-varargs", useVarArgs)
.getArguments();
return unmodifiableList(args);
}
Expand Down

0 comments on commit d502f33

Please sign in to comment.