mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
do not look for setter if no annotation is found
This commit is contained in:
+2
-2
@@ -56,8 +56,6 @@ public class ComponentProcessor {
|
||||
for (Method method : clazz.getMethods()) {
|
||||
if (method.getName().startsWith("get")) {
|
||||
try {
|
||||
Method setter = clazz.getMethod("set" + method.getName().substring(3), method
|
||||
.getReturnType());
|
||||
if (method.isAnnotationPresent(EditableProperty.class)) {
|
||||
EditableProperty annotation = method.getAnnotation(EditableProperty.class);
|
||||
String name;
|
||||
@@ -66,6 +64,8 @@ public class ComponentProcessor {
|
||||
} else {
|
||||
name = annotation.name();
|
||||
}
|
||||
Method setter = clazz.getMethod("set" + method.getName().substring(3), method
|
||||
.getReturnType());
|
||||
PropertyWrapper property = new PropertyWrapper(name,
|
||||
method.getReturnType(), method, setter, annotation.defaultable());
|
||||
properties.add(property);
|
||||
|
||||
Reference in New Issue
Block a user