Package org.apache.geronimo.gshell.command

Examples of org.apache.geronimo.gshell.command.Command.execute()


                    } else if (n instanceof AliasNode) {
                        cmd = lookup(((AliasNode) n).getCommand().substring(ALIAS_PREFIX.length()));
                    } else {
                        throw new IllegalStateException("Unrecognized node type: " + n.getClass().getName());
                    }
                    return cmd.execute(ctx, Arguments.shift(objects));
                } finally {
                    env.getVariables().unset(CURRENT_NODE);
                }
            }
            return SUCCESS;
View Full Code Here


                    } else if (n instanceof AliasNode) {
                        cmd = lookup(((AliasNode) n).getCommand().substring(ALIAS_PREFIX.length()));
                    } else {
                        throw new IllegalStateException("Unrecognized node type: " + n.getClass().getName());
                    }
                    return cmd.execute(ctx, Arguments.shift(objects));
                } finally {
                    env.getVariables().unset(CURRENT_NODE);
                }
            }
            return SUCCESS;
View Full Code Here

        }
        else {
            io.out.println("Command " + Renderer.encode(extractCommandName(path), Code.BOLD));
            io.out.println("   " + cmd.getDescription());

            cmd.execute(context, "--help");
        }

        io.out.println();
    }
}
View Full Code Here

                    } else if (n instanceof AliasNode) {
                        cmd = lookup(((AliasNode) n).getCommand().substring(ALIAS_PREFIX.length()));
                    } else {
                        throw new IllegalStateException("Unrecognized node type: " + n.getClass().getName());
                    }
                    return cmd.execute(ctx, Arguments.shift(objects));
                } finally {
                    env.getVariables().unset(CURRENT_NODE);
                }
            }
            return SUCCESS;
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.