private boolean methodMatches(Method method, String key) {
return matchesViaAnnotation(method, key) || matchesByName(method, key);
}
private boolean matchesViaAnnotation(Method method, String key) {
ConnectionStringField annotation = method
.getAnnotation(ConnectionStringField.class);
return annotation != null
&& annotation.name().toLowerCase().equals(key.toLowerCase());
}