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