Home | History | Annotate | Download | only in args
      1 package com.beust.jcommander.args;
      2 
      3 import com.beust.jcommander.IVariableArity;
      4 import com.beust.jcommander.Parameter;
      5 
      6 import java.util.ArrayList;
      7 import java.util.List;
      8 
      9 public class VariableArity implements IVariableArity {
     10 
     11   private int m_count;
     12 
     13   public VariableArity(int count) {
     14     m_count = count;
     15   }
     16 
     17   @Parameter
     18   public List<String> main = new ArrayList<String>();
     19 
     20   @Parameter(names = "-variable", variableArity = true)
     21   public List<String> var = new ArrayList<String>();
     22 
     23   public int processVariableArity(String optionName, String[] options) {
     24     return m_count;
     25   }
     26 }
     27