Examples of SafeCallable


Examples of org.crsh.util.SafeCallable

*/
public class Helper {

  public static Object invokeMethod(RuntimeContext context, String name, Object args, MissingMethodException ex) {
    if (context instanceof InvocationContext<?>) {
      SafeCallable executed = Helper.resolveMethodInvocation((InvocationContext)context, name, args);
      if (executed != null) {
        return executed.call();
      }
    }

    //
    Object o = context.getSession().get(name);
View Full Code Here

Examples of org.crsh.util.SafeCallable

      }
      catch (CommandException ce) {
        throw new InvokerInvocationException(ce);
      }
      if (cmd != null) {
        return new SafeCallable() {
          @Override
          public Object call() {
            PipeLineClosure closure = new PipeLineClosure(context, name, cmd);
            return closure.call((Object[])args);
          }
View Full Code Here

Examples of org.crsh.util.SafeCallable

    }
  }

  @Override
  public Object invokeMethod(String name, Object args) {
    SafeCallable runnable = Helper.resolveMethodInvocation(new InvocationContextImpl(context), name, args);
    if (runnable != null) {
      return runnable.call();
    } else {
      return InvokerHelper.invokeMethod(owner, name, args);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.