// is it a static class.field?
Object ret = getStaticField(parameter);
if (ret != null)
return ret;
TypeAdapter ta = TypeAdapter.adapterFor(paramType);
//debug(paramType + " Parameter: [" + parameter + "] " + ta.getClass());
if (ta != null &&
!ta.getClass().equals(fit.TypeAdapter.class)
)
{
//debug("Inside Parameter: [" + parameter + "] " + ta.getClass());
try
{
if (paramType.isArray() && parameter.startsWith(ARRAY))
{
ta.init(this, paramType);
Class<?> componentType = paramType.getComponentType();
TypeAdapter cta = TypeAdapter.on(this, componentType);
//debug(cta + " - componentType: " + componentType.getCanonicalName());
String[] arrStr = parameter.substring(ARRAY.length()).split(",");
paramObject = Array.newInstance(componentType, arrStr.length);
for (int i=0; i < arrStr.length; i++) {
String token = arrStr[i].trim();
Object var = fetchVariable(token);
if (var == null) {
var = cta.parse(token);
//debug(var + " - i: " + i + " - " + token);
}
Array.set(paramObject, i, var);
}
}