final Element elementAnnotation = f.getAnnotation(Element.class); // get the 'Element' annotation of the Field final String name = elementAnnotation.name(); // get the 'name'-value of the annotation
element = Element.valueOfIgnoreCase(atom.getType_symbol()); } catch (IllegalArgumentException e) { logger.info("Element {} was not recognised as a BioJava-known element, the element will be represented as the generic element {}", atom.getType_symbol(), Element.R.name());