summaryrefslogtreecommitdiff
path: root/src/main/java/com/beust/jcommander/IVariableArity.java
diff options
context:
space:
mode:
authorCédric Beust <cedric@color.com>2011-10-03 06:53:22 -0700
committerCédric Beust <cedric@color.com>2011-10-03 06:53:22 -0700
commitc709e6db81d11fe4aa6c573775ba5577902aa35c (patch)
tree79edb819f861be7f0da6cc04f5d4e772689cb928 /src/main/java/com/beust/jcommander/IVariableArity.java
parentd2a567ff013254ee00b600d0eb298770d35b089f (diff)
downloadjcommander-c709e6db81d11fe4aa6c573775ba5577902aa35c.tar.gz
Implemented variable arities.
Diffstat (limited to 'src/main/java/com/beust/jcommander/IVariableArity.java')
-rw-r--r--src/main/java/com/beust/jcommander/IVariableArity.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/com/beust/jcommander/IVariableArity.java b/src/main/java/com/beust/jcommander/IVariableArity.java
new file mode 100644
index 0000000..e7499c9
--- /dev/null
+++ b/src/main/java/com/beust/jcommander/IVariableArity.java
@@ -0,0 +1,16 @@
+package com.beust.jcommander;
+
+/**
+ * Must be implemented by argument classes that contain at least one
+ * @Parameter with "variableArity = true".
+ */
+public interface IVariableArity {
+
+ /**
+ * @param optionName the name of the option to process.
+ * @param options the entire list of options.
+ *
+ * @return how many options were processed.
+ */
+ int processVariableArity(String optionName, String[] options);
+}