/** * Converts content into a format which is used to store it internally within an attribute of a * specific type. * * @param value the object to attempt parsing of. * @throws IllegalArgumentException if parsing is attempted and is unsuccessful. */ public static Object parse(AttributeType type, Object content) throws IllegalArgumentException { // JD: TODO: this is pretty lame if (type instanceof AttributeTypeImpl) { AttributeTypeImpl hack = (AttributeTypeImpl) type; Object parsed = hack.parse(content); if (parsed != null) { return parsed; } } return content; }
/** * Converts content into a format which is used to store it internally within an attribute of a * specific type. * * @param value * the object to attempt parsing of. * * @throws IllegalArgumentException * if parsing is attempted and is unsuccessful. */ public static Object parse(AttributeType type, Object content) throws IllegalArgumentException { // JD: TODO: this is pretty lame if (type instanceof AttributeTypeImpl) { AttributeTypeImpl hack = (AttributeTypeImpl) type; Object parsed = hack.parse(content); if (parsed != null) { return parsed; } } return content; }