Examples of CRaSH


Examples of org.crsh.shell.impl.command.CRaSH

      Collections.<String, Object>emptyMap(),
      cmdFS,
      confFS,
      Thread.currentThread().getContextClassLoader());
    ctx.refresh();
    CRaSH crash = new CRaSH(ctx);
    StringBuilder buffer = new StringBuilder();
    for (Map.Entry<String, String> s : crash.getCommands()) {
      Command<?> cmd = crash.getCommand(s.getKey());
      CommandDescriptor<?> desc = cmd.getDescriptor();
      buffer.append("== ").append(desc.getName()).append("\n").append("\n");
      buffer.append("----\n");
      buffer.append(cmd.describe("", Format.MAN));
      buffer.append("----\n");
View Full Code Here

Examples of org.crsh.shell.impl.command.CRaSH

      throw ex;
    }
  }

  public static PipeLineClosure resolveProperty(final InvocationContext context, final String property) {
    CRaSH crash = (CRaSH)context.getSession().get("crash");
    if (crash != null) {
      try {
        Command<?> cmd = crash.getCommand(property);
        if (cmd != null) {
          return new PipeLineClosure(context, property, cmd);
        } else {
          return null;
        }
View Full Code Here

Examples of org.crsh.shell.impl.command.CRaSH

      return null;
    }
  }

  public static SafeCallable resolveMethodInvocation(final InvocationContext context, final String name, final Object args) {
    CRaSH crash = (CRaSH)context.getSession().get("crash");
    if (crash != null) {
      final Command<?> cmd;
      try {
        cmd = crash.getCommand(name);
      }
      catch (CommandException ce) {
        throw new InvokerInvocationException(ce);
      }
      if (cmd != null) {
View Full Code Here

Examples of org.crsh.shell.impl.command.CRaSH

      discovery,
      attributes,
      new FS().mount(classLoader,Path.get("/crash/commands/")).mount(commands),
      new FS().mount(classLoader,Path.get("/crash/")),
      classLoader);
    this.crash = new CRaSH(context);
  }
View Full Code Here

Examples of org.crsh.shell.impl.command.CRaSH

      new LabelElement("NAME").style(Style.style(Decoration.bold)),
      new LabelElement("DESCRIPTION")
    );

    //
    CRaSH crash = (CRaSH)context.getSession().get("crash");
    for (Map.Entry<String, String> command : crash.getCommands()) {
      try {
        String desc = command.getValue();
        if (desc == null) {
          desc = "";
        }
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.