@Override public AttributeType unmarshal(String typeAsString) throws Exception { if (typeAsString == null) { throw new IllegalArgumentException("Type cannot be null."); } final AttributeType type = AttributeType.parse(typeAsString); if (type == null) { throw new IllegalArgumentException(String.format("Unsupported attribute type '%s'. %s", typeAsString, supportedTypeNames)); } return type; }