(Method annotatedMethod)
| 135 | } |
| 136 | |
| 137 | private @Nullable Method findGetter(Method annotatedMethod) { |
| 138 | ManagedAttribute ma = annotatedMethod.getAnnotation(ManagedAttribute.class); |
| 139 | try { |
| 140 | if (!"".equals(ma.getter())) { |
| 141 | return annotatedMethod.getDeclaringClass().getMethod(ma.getter()); |
| 142 | } else { |
| 143 | String name = annotatedMethod.getName(); |
| 144 | if (name.startsWith("get") || name.startsWith("is")) { |
| 145 | return annotatedMethod; |
| 146 | } |
| 147 | if (name.startsWith("set")) { |
| 148 | return annotatedMethod.getDeclaringClass().getMethod("g" + name.substring(1)); |
| 149 | } |
| 150 | } |
| 151 | return null; |
| 152 | } catch (NoSuchMethodException e) { |
| 153 | LOG.severe("Error during execution: " + e.getMessage()); |
| 154 | return null; |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | private @Nullable Method findSetter(Method annotatedMethod) { |
| 159 | ManagedAttribute ma = annotatedMethod.getAnnotation(ManagedAttribute.class); |
no test coverage detected