Annotation as[] = pas[argIndex];
for (int a = 0; a < as.length; a++)
{
if (as[a] instanceof Parameter)
{
Parameter o = (Parameter) as[a];
out[argIndex] = coerce(session, target, types[argIndex],
o.absentValue());
start = argIndex + 1;
}
}
}
in = new ArrayList(in);
for (Iterator<Object> itArgs = in.iterator(); itArgs.hasNext();)
{
Object item = itArgs.next();
if (item instanceof String)
{
if (((String) item).startsWith("-"))
{
for (int argIndex = 0; argIndex < pas.length; argIndex++)
{
Annotation as[] = pas[argIndex];
for (int a = 0; a < as.length; a++)
{
if (as[a] instanceof Parameter)
{
Parameter param = (Parameter) as[a];
for (String name : param.names())
{
if (name.equals(item))
{
if (param.presentValue() == null || param.presentValue().equals(Parameter.UNSPECIFIED))
{
itArgs.remove(); // parameter name
assert itArgs.hasNext();
Object value = itArgs.next(); // the value
itArgs.remove(); // remove it
out[argIndex] = coerce(session, target,
types[argIndex], value);
}
else if (param.presentValue() != null)
{
itArgs.remove();
out[argIndex] = coerce(session, target,
types[argIndex], param.presentValue());
}
break;
}
}
}