* Converts an annotation into its correspondign meta-data laden POJO.
* @param annotation
* @return
*/
private static ErrorHandlerData convertErrorHandlerAnnotationToData(ErrorHandler annotation) {
ErrorHandlerData data = new ErrorHandlerData();
data.setDefaultHandler(annotation.defaultHandler());
data.setExceptionClass(annotation.exceptionClass());
data.setId(annotation.id());
data.setMessageDetail(annotation.messageDetail());
data.setMessageDetailArgKeys(annotation.messageDetailArgKeys());
data.setMessageDetailArgs(annotation.messageDetailArgs());
data.setMessageDetailKey(annotation.messageDetailKey());
data.setMessageSummary(annotation.messageSummary());
data.setMessageSummaryKey(annotation.messageSummaryKey());
data.setMessageSummaryArgKeys(annotation.messageSummaryArgKeys());
data.setMessageSummaryArgs(annotation.messageSummaryArgs());
data.setOutcome(annotation.outcome());
data.setSeverity(annotation.severity());
data.setType(annotation.type());
data.setUseExceptionForDetail(annotation.useExceptionForDetail());
data.setUseMessageBundleForArgs(annotation.useMessageBundleForArgs());
data.setUseMessageBundleForMessage(annotation.useMessageBundleForMessage());
return data;
}