private boolean setByWildcard = false;
+ private String givenLinkedId = null;
+
private int boolIndex = -1;
private List<Integer> argsIndexes;
private Map<String, ArgValue> idMap = new HashMap<>();
+ private ArgValuesMap avm;
+
/*
* Type type is only really used by --help-type
*/
private Type type = null;
- protected ArgValues(Arg a)
+ protected ArgValues(Arg a, ArgValuesMap avm)
{
this.arg = a;
this.argValueList = new ArrayList<ArgValue>();
this.boolValue = arg.getDefaultBoolValue();
+ this.avm = avm;
}
protected boolean setByWildcard()
}
protected void setBoolean(Type t, boolean b, int i,
- boolean beingSetByWildcard)
+ boolean beingSetByWildcard, String givenLinkedId)
{
this.setType(t);
// don't overwrite a wildcard set boolean with a non-wildcard set boolean
this.boolValue = b;
this.boolIndex = i;
this.setSetByWildcard(beingSetByWildcard);
+ this.givenLinkedId = givenLinkedId;
}
protected boolean getBoolean()
}
protected void addValue(Type type, String val, int argIndex,
- boolean wildcard)
+ boolean wildcard, String givenLinkedId)
{
- addArgValue(new ArgValue(arg(), type, val, argIndex), wildcard);
+ addArgValue(new ArgValue(arg(), type, val, argIndex, wildcard,
+ givenLinkedId, avm.getLinkedId()), wildcard);
}
protected void addValue(SubVals sv, Type type, String content,
- int argIndex, boolean wildcard)
+ int argIndex, boolean wildcard, String givenLinkedId)
{
- addArgValue(new ArgValue(arg(), sv, type, content, argIndex), wildcard);
+ addArgValue(new ArgValue(arg(), sv, type, content, argIndex, wildcard,
+ givenLinkedId, avm.getLinkedId()), wildcard);
}
protected void addArgValue(ArgValue av, boolean beingSetByWildcard)
}
return false;
}
+
+ public boolean setByWildcardLinkedId()
+ {
+ // looking for deliberately user set wildcard
+ return this.setByWildcard && this.givenLinkedId != null;
+ }
+
}
\ No newline at end of file