/** * Creates a new instance of the object described by this field. * * @param parent The object for which the field is created * @param args the set of constructor arguments * @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, Object[] args) throws IllegalStateException { if (_handler instanceof ExtendedFieldHandler) { return ((ExtendedFieldHandler) _handler).newInstance(parent, args); } // -- backward compatibility: ignore arguments return newInstance(parent); }
/** * Creates a new instance of the object described by this field. * * @param parent The object for which the field is created * @param args the set of constructor arguments * @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, Object[] args ) throws IllegalStateException { if (_handler instanceof ExtendedFieldHandler) { return ((ExtendedFieldHandler)_handler).newInstance(parent, args); } //-- backward compatibility: ignore arguments return newInstance( parent ); }
return ((ExtendedFieldHandler)_handler).newInstance( parent, args ); return _handler.newInstance( parent );
return (T) ((ExtendedFieldHandler<T>) _handler).newInstance(parent, args); return _handler.newInstance(parent);
ExtendedFieldHandler efh = (ExtendedFieldHandler)handler; state.object = efh.newInstance(parentState.object, args.values);
if (handler instanceof ExtendedFieldHandler) { ExtendedFieldHandler efh = (ExtendedFieldHandler) handler; state.setObject(efh.newInstance(parentState.getObject(), args.getValues())); } else { String err =