if (field.getDeclaringClass().isAnnotationPresent(Accessor.class)
&& (Accessor.AccessType.METHOD == field.getDeclaringClass().getAnnotation(Accessor.class).value())) {
try {
Method method = field.getDeclaringClass().getMethod(field.getName());
if (Property.class.isAssignableFrom(method.getReturnType())) {
return new PropertyMethodElement(method);
} else {
return new ReadOnlyPropertyMethodElement(method);
}
} catch (NoSuchMethodException e) {
logger.log(Level.FINE, "No method accessor for " + field.getName());