import jalview.bin.Console;
import jalview.bin.argparser.Arg.Opt;
+import jalview.bin.argparser.Arg.Type;
public class ArgValues
{
private Map<String, ArgValue> idMap = new HashMap<>();
+ /*
+ * Type type is only really used by --help-type
+ */
+ private Type type = null;
+
protected ArgValues(Arg a)
{
this.arg = a;
return arg;
}
+ protected void setType(Type t)
+ {
+ if (this.arg().hasOption(Opt.HASTYPE))
+ this.type = t;
+ }
+
+ public Type getType()
+ {
+ return type;
+ }
+
protected int getCount()
{
return argCount;
return this.negated;
}
- protected void setBoolean(boolean b, int i, boolean beingSetByWildcard)
+ protected void setBoolean(Type t, boolean b, int i,
+ boolean beingSetByWildcard)
{
+ this.setType(t);
// don't overwrite a wildcard set boolean with a non-wildcard set boolean
if (boolIndex >= 0 && !this.setByWildcard && beingSetByWildcard)
return;
return sb.toString();
}
- protected void addValue(String val, int argIndex, boolean wildcard)
+ protected void addValue(Type type, String val, int argIndex,
+ boolean wildcard)
{
- addArgValue(new ArgValue(arg(), val, argIndex), wildcard);
+ addArgValue(new ArgValue(arg(), type, val, argIndex), wildcard);
}
- protected void addValue(SubVals sv, String content, int argIndex,
- boolean wildcard)
+ protected void addValue(SubVals sv, Type type, String content,
+ int argIndex, boolean wildcard)
{
- addArgValue(new ArgValue(arg(), sv, content, argIndex), wildcard);
+ addArgValue(new ArgValue(arg(), sv, type, content, argIndex), wildcard);
}
protected void addArgValue(ArgValue av, boolean beingSetByWildcard)