for (Method method : cls.getMethods()) {
if (method.isAnnotationPresent(Attribute.class)) {
Attribute attribute = method.getAnnotation(Attribute.class);
properties.put(attribute.name(),
new ModelProperty(method.getName(), method.getReturnType(),
map("verbose", attribute.verbose(), "visible", attribute.visible()))
);
}
}
return properties;