コード例 #1
0
 /**
  * Makes sure that we injected a helper object inside a global object. This cannot be implemented
  * as step in {@link WipRelayRunner}, because the method is synchronized and cannot undergo
  * required control inversion.
  */
 private synchronized RelayOk ensureObjectInjected(
     GenericCallback<Void> callback, SyncCallback syncCallback) {
   if (objectInjected) {
     callback.success(null);
     return RelaySyncCallback.finish(syncCallback);
   } else {
     objectInjected = true;
     return injectObject(callback, syncCallback);
   }
 }