/** * Creates a new instance of the object described by this field. * * @param parent The object for which the field is created * @return A new instance of the field's value * @throws IllegalStateException This field is a simple type and cannot be instantiated */ public Object newInstance(Object parent) throws IllegalStateException { return new Time(); } // -- newInstance
/** * Creates a new instance of the object described by this field. * * @param parent The object for which the field is created * @return A new instance of the field's value * @throws IllegalStateException This field is a simple type and * cannot be instantiated */ public Object newInstance(Object parent) throws IllegalStateException { return new Time(); } //-- newInstance
/** * {@inheritDoc} */ public Object convert(final Object object) { return new org.exolab.castor.types.Time(((Long) object).longValue(), _utc); }
/** * {@inheritDoc} */ public Object convert(final Object object) { try { return new org.exolab.castor.types.Time((String) object); } catch (ParseException ex) { throw new IllegalArgumentException(ex.toString()); } }
private static Time parseTimeInternal(String str, Time result) throws ParseException { if (str == null) { throw new IllegalArgumentException("The string to be parsed must not be null."); } if (result == null) { result = new Time(); } char[] chars = str.toCharArray(); int idx = parseTime(str, result, chars, 0, BAD_TIME); parseTimeZone(str, result, chars, idx, BAD_TIME); return result; } // parse
private static Time parseTimeInternal(String str, Time result) throws ParseException { if (str == null) { throw new IllegalArgumentException("The string to be parsed must not be null."); } if (result == null) { result = new Time(); } char[] chars = str.toCharArray(); int idx = parseTime(str, result, chars, 0, BAD_TIME); parseTimeZone(str, result, chars, idx, BAD_TIME); return result; } //parse