/** * @see DomainObjectContainer#newInstance(Class, Object) * * @deprecated - this method supports a rare use case, causing unnecessary interface bloat for very little gain. */ @Deprecated protected <T> T newInstance(final Class<T> ofClass, final Object object) { return getContainer().newInstance(ofClass, object); }
/** * Returns a new instance of the specified class that has the sane persisted * state as the specified object. * * <p> * This method isn't quite deprecated, but generally consider using * {@link #newTransientInstance(Class)} instead. */ protected <T> T newInstance(final Class<T> ofClass, final Object object) { return getContainer().newInstance(ofClass, object); } // }}