if (annotation != null && annotation.isAnnotation()) {
try {
AnnotationDefinition annotationDefinition = AnnotationDefinition.build(annotation,
field.getAnnotations().get(annotationName).getValueMap(),
pkgRegistry.getTypeResolver());
fieldDef.addAnnotation(annotationDefinition);
} catch (NoSuchMethodException nsme) {
kbuilder.addBuilderResult(new TypeDeclarationError(field,
"Annotated field " + field.getFieldName() +
" - undefined property in @annotation " +
annotationName + ": " + nsme.getMessage() + ";"));