/** * Wraps of the previously requested feature transfer managers and returns a standard transfer manager. * @return {@link TransferManager} wrapped with the requested features */ public TransferManager asDefault() { return wrap(TransferManager.class); }
/** * Wraps of the previously requested feature transfer managers and casts the result to the requested class. * If no specific class is requested, {@link #asDefault()} can be used instead. * * @param featureAnnotation Feature annotation corresponding to the requested transfer manager * @return {@link TransferManager} casted to the feature lasted wrapped (and requested by this method) */ @SuppressWarnings("unchecked") public <T extends TransferManager> T as(Class<? extends Annotation> featureAnnotation) { Class<T> implementingTransferManagerClass = (Class<T>) getFeatureTransferManagerClass(featureAnnotation); return wrap(implementingTransferManagerClass); }