/** * Instantiates a bridge object. * * @param nextBridge * the next Bridge object in the pipeline, or the terminator service * @param filter * the filter object for this step of the pipeline */ public S instantiateBridge(S nextBridge, F filter) { if (instantiator == null) createInstantiator(); return instantiator.with(filterInterface, filter).with(serviceInterface, nextBridge).newInstance(); }
/** * Instantiates a bridge object. * * @param nextBridge * the next Bridge object in the pipeline, or the terminator service * @param filter * the filter object for this step of the pipeline */ public S instantiateBridge(S nextBridge, F filter) { if (instantiator == null) createInstantiator(); return instantiator.with(filterInterface, filter).with(serviceInterface, nextBridge).newInstance(); }
@Override public <T> T createThunk(Class<T> proxyType, ObjectCreator objectCreator, String description) { assert proxyType != null; assert objectCreator != null; assert InternalUtils.isNonBlank(description); if (!proxyType.isInterface()) throw new IllegalArgumentException(String.format( "Thunks may only be created for interfaces; %s is a class.", PlasticUtils.toTypeName(proxyType))); return getInstantiator(proxyType).with(ObjectCreator.class, objectCreator).with(String.class, description) .newInstance(); }
@Override public <T> T createThunk(Class<T> proxyType, ObjectCreator objectCreator, String description) { assert proxyType != null; assert objectCreator != null; assert InternalUtils.isNonBlank(description); if (!proxyType.isInterface()) throw new IllegalArgumentException(String.format( "Thunks may only be created for interfaces; %s is a class.", PlasticUtils.toTypeName(proxyType))); return getInstantiator(proxyType).with(ObjectCreator.class, objectCreator).with(String.class, description) .newInstance(); }