public XmlObject convert(final Object attribute) {
if (attribute != null && attribute instanceof String) {
try {
final Constructor<? extends XmlObject> constructor = this.clazz.getDeclaredConstructor();
final XmlObject xmlObject = constructor.newInstance();
xmlObject.buildFrom((String) attribute);
return xmlObject;
} catch (final Exception e) {
logger.error("Cannot build XmlObject : {}", e, this.clazz);
}
}