From f8cafaaee7d6a9ac69de3c2fcc6c7056ae8c8c53 Mon Sep 17 00:00:00 2001 From: hrachya Date: Tue, 26 May 2015 15:49:32 -0700 Subject: [PATCH] new CliOption class for wrapping org.apache.commons.cli.Option --- .../wordnik/swagger/codegen/CliOption.java | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 modules/swagger-codegen/src/main/java/com/wordnik/swagger/codegen/CliOption.java diff --git a/modules/swagger-codegen/src/main/java/com/wordnik/swagger/codegen/CliOption.java b/modules/swagger-codegen/src/main/java/com/wordnik/swagger/codegen/CliOption.java new file mode 100644 index 0000000000..837759b9d2 --- /dev/null +++ b/modules/swagger-codegen/src/main/java/com/wordnik/swagger/codegen/CliOption.java @@ -0,0 +1,44 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.wordnik.swagger.codegen; + +import org.apache.commons.cli.Option; + +public class CliOption extends Option { + + private Boolean langSpecific = false; + + public CliOption(String opt, String description) throws IllegalArgumentException { + super(opt, description); + } + + public CliOption(String opt, boolean hasArg, String description) throws IllegalArgumentException { + super(opt, hasArg, description); + } + + public CliOption(String opt, String longOpt, boolean hasArg, String description) throws IllegalArgumentException { + super(opt, longOpt, hasArg, description); + } + + public CliOption(String opt, String description, Boolean langSpecific) throws IllegalArgumentException { + this(opt, description); + this.langSpecific = langSpecific; + } + + public CliOption(String opt, boolean hasArg, String description, Boolean langSpecific) throws IllegalArgumentException { + this(opt, hasArg, description); + this.langSpecific = langSpecific; + } + + public CliOption(String opt, String longOpt, boolean hasArg, String description, Boolean langSpecific) throws IllegalArgumentException { + this(opt, longOpt, hasArg, description); + this.langSpecific = langSpecific; + } + + public Boolean isLangSpecific() { + return langSpecific; + } +}