public OptionalName methodName(MethodDoc method) {
return nameFor(element, elementProperty, method);
}
private OptionalName nameFor(String annotation, String property, ProgramElementDoc doc) {
AnnotationParser element = new AnnotationParser(doc);
if (element.isAnnotatedBy(ignore)) {
return ignored();
}
return presentOrMissing(element.getAnnotationValue(annotation, property));
}