if (propertyDesc != null)
{
if (fastClass != null)
{
Method method = propertyDesc.getReadMethod();
FastMethod fastMethod = fastClass.getMethod(method);
return new KeyedFastPropertyGetter(fastMethod, index, eventAdapterService);
}
else
{
return new KeyedMethodPropertyGetter(propertyDesc.getReadMethod(), index, eventAdapterService);
}
}
// Try the array as a simple property
propertyDesc = eventType.getSimpleProperty(propertyNameAtomic);
if (propertyDesc == null)
{
return null;
}
Class returnType = propertyDesc.getReturnType();
if (returnType.isArray())
{
if (propertyDesc.getReadMethod() != null)
{
Method method = propertyDesc.getReadMethod();
if (fastClass != null)
{
FastMethod fastMethod = fastClass.getMethod(method);
return new ArrayFastPropertyGetter(fastMethod, index, eventAdapterService);
}
else
{
return new ArrayMethodPropertyGetter(method, index, eventAdapterService);
}
}
else
{
Field field = propertyDesc.getAccessorField();
return new ArrayFieldPropertyGetter(field, index, eventAdapterService);
}
}
else if (JavaClassHelper.isImplementsInterface(returnType, List.class))
{
if (propertyDesc.getReadMethod() != null)
{
Method method = propertyDesc.getReadMethod();
if (fastClass != null)
{
FastMethod fastMethod = fastClass.getMethod(method);
return new ListFastPropertyGetter(method, fastMethod, index, eventAdapterService);
}
else
{
return new ListMethodPropertyGetter(method, index, eventAdapterService);
}
}
else
{
Field field = propertyDesc.getAccessorField();
return new ListFieldPropertyGetter(field, index, eventAdapterService);
}
}
else if (JavaClassHelper.isImplementsInterface(returnType, Iterable.class))
{
if (propertyDesc.getReadMethod() != null)
{
Method method = propertyDesc.getReadMethod();
if (fastClass != null)
{
FastMethod fastMethod = fastClass.getMethod(method);
return new IterableFastPropertyGetter(method, fastMethod, index, eventAdapterService);
}
else
{
return new IterableMethodPropertyGetter(method, index, eventAdapterService);