Returns a {@link Callable} object that, when
called, runs the given privileged action and returns its result.
@param action the privileged action to run
@return a callable object
@throws NullPointerException if action null
346657
public static Callable<Object> callable(final PrivilegedAction<?> action) {
        if (action == null)
            throw new NullPointerException();
        return new Callable<Object>() {
            public Object call() { return action.run(); }};
    }
481007
public static <T> T
        doPrivileged(PrivilegedExceptionAction<T> action)
        throws PrivilegedActionException {
        try {
            return action.run();
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new PrivilegedActionException(e);
        }
    }
166886
private function createCallableFromAction($action) : callable
    {
        // Check if this looks like it could be a class/method string
        if (!is_callable($action) && is_string($action)) {
            return $this->convertClassStringToFactory($action);
        }

        return $action;
    }
1125904
public static <T1, T2, T3, T4, T5> Func5<T1, T2, T3, T4, T5, Void> toFunc(
            final Action5<T1, T2, T3, T4, T5> action) {
        return toFunc(action, (Void) null);
    }
992848
static <T> ContinuableFuture<T> executeWithThreadPool(final Callable<T> action) {
        return execute(new FutureTask<>(action), TP_EXECUTOR);
    }
112669
public CmdLineAction onSwitch(Consumer<@NonNull String> action) {
		SwitchCmdLineAction switchAction = new SwitchCmdLineAction(action);

		this.switchActions.add(switchAction);
		return switchAction;
	}
1363924
@SuppressWarnings({"ConstantConditions","deprecation"})
    @SuppressFBWarnings("RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE")
    public void addAction(@Nonnull Action a) {
        if(a==null) {
            throw new IllegalArgumentException("Action must be non-null");
        }
        getActions().add(a);
    }
508624
public function action(callable $action = null)
    {
        if (\func_num_args() === 0) {
            return $this->_action;
        }

        $this->_action = $action;

        return $this;
    }
436032
@Override
	public <T> T execute(SolrCallback<T> action) {
		Assert.notNull(action, "SolrCallback must not be null!");

		try {
			SolrClient solrClient = this.getSolrClient();
			return action.doInSolr(solrClient);
		} catch (Exception e) {
			DataAccessException resolved = getExceptionTranslator().translateExceptionIfPossible(
					e instanceof RuntimeException ? (RuntimeException) e : new RuntimeException(e.getMessage(), e));
			throw resolved == null ? new UncategorizedSolrException(e.getMessage(), e) : resolved;
		}
	}
651241
public void setAction(MethodBinding action) {
        MethodExpressionMethodBindingAdapter adapter;
        if (null != action) {
            adapter = new MethodExpressionMethodBindingAdapter(action);
            setActionExpression(adapter);
        } else {
            setActionExpression(null);
        }
    }
73123
def _get_action(self, action):
        
        return_action = action
        if self.partial_update_is_update and action == 'partial_update':
            return_action = 'update'
        return return_action
1194215
function(C, action, thisp) {
		if (C && C.$superclass) {
			action = action || gui.Combo.identity;
			return action.call(thisp, C.$superclass);
		}
		return null;
	}
1071946
public function getActionResult($action = null)
    {
        $result = $this->results;

        if (!empty($action)) {
            $result = $this->results[$action];
        }

        return $result;
    }
715696
@Override
	public Action getAction(String name, String nodeID) {
		Strategy<ActionEndpoint> strategy = null;
		long stamp = lock.tryOptimisticRead();
		if (stamp != 0) {
			try {
				strategy = strategies.get(name);
			} catch (Exception modified) {
				stamp = 0;
			}
		}
		if (!lock.validate(stamp) || stamp == 0) {
			stamp = lock.readLock();
			try {
				strategy = strategies.get(name);
			} finally {
				lock.unlockRead(stamp);
			}
		}
		if (strategy == null) {
			throw new ServiceNotFoundError(nodeID, name);
		}
		ActionEndpoint endpoint = strategy.getEndpoint(nodeID);
		if (endpoint == null) {
			throw new ServiceNotAvailableError(nodeID, name);
		}
		return endpoint;
	}
100575
public void setAction(final Action action) {
		MenuItemModel model = getOrCreateComponentModel();
		model.action = action;
		model.url = null;
	}
979597
public <T> ContextManager execute(Action<T> action, Handler<AsyncResult<T>> resultHandler) {
    vertx.executeBlocking(action, resultHandler);
    return this;
  }
811997
public static Parameter getActionParameter(Action action, String paramName) {
        for (Parameter param : action.getParameters()) {
            if (paramName.equals(param.getName())) {
                return param;
            }
        }
        return NOT_FOUND_PARAMETER;
    }