} else {
// check if there is a size method on the object that returns an
// integer
// and if so, just use it
Object[] params = new Object[0];
Info velInfo = new Info("", 1, 1);
VelMethod vm = Introspector.getUberspect().getMethod(val, "size", params, velInfo);
if (vm != null && vm.getReturnType() == Integer.TYPE) {
Integer result = (Integer) vm.invoke(val, params);
return result.intValue();
}