Package org.apache.karaf.shell.commands

Examples of org.apache.karaf.shell.commands.Command.description()


        out.println("h1. " + command.scope() + ":" + command.name());
        out.println();

        out.println("h2. Description");
        out.println(command.description());
        out.println();

        StringBuffer syntax = new StringBuffer();
        syntax.append(String.format("%s:%s", command.scope(), command.name()));
        if (options.size() > 0) {
View Full Code Here


        out.println("<section>");
        out.println("  <title>" + command.scope() + ":" + command.name() + "</title>");
        out.println("  <section>");
        out.println("    <title>Description</title>");
        out.println("    <para>");
        out.println(command.description());
        out.println("    </para>");
        out.println("  </section>");

        StringBuffer syntax = new StringBuffer();
        syntax.append(String.format("%s:%s", command.scope(), command.name()));
View Full Code Here

    private static void listCommands() {
        System.out.println("Available commands:");
        for (Map.Entry<String, Class<?>> entry : COMMANDS.entrySet()) {
            Command ann = entry.getValue().getAnnotation(Command.class);
            System.out.printf("  %s - %s\n", entry.getKey(), ann.description());
        }

        System.out.println("Type 'command --help' for more help on the specified command.");
    }
View Full Code Here

            function = unProxy(function);
            if (function instanceof AbstractCommand) {
                try {
                    Class<? extends Action> actionClass = ((AbstractCommand) function).getActionClass();                   
                    Command ann = new ActionMetaDataFactory().getCommand(actionClass);
                    description = ann.description();
                } catch (Throwable e) {
                }
                if (name.startsWith("*:")) {
                    name = name.substring(2);
                }
View Full Code Here

            function = unProxy(function);
            if (function instanceof AbstractCommand) {
                try {
                    Class<? extends Action> actionClass = ((AbstractCommand) function).getActionClass();                   
                    Command ann = new ActionMetaDataFactory().getCommand(actionClass);
                    description = ann.description();
                } catch (Throwable e) {
                }
                if (name.startsWith("*:")) {
                    name = name.substring(2);
                }
View Full Code Here

    private static void listCommands() {
        System.out.println("Available commands:");
        for (Map.Entry<String, Class<?>> entry : COMMANDS.entrySet()) {
            Command ann = entry.getValue().getAnnotation(Command.class);
            System.out.printf("  %s - %s\n", entry.getKey(), ann.description());
        }
       
        System.out.println("Type 'command --help' for more help on the specified command.");
    }
View Full Code Here

        out.print(command.name());
        out.println("</title>");
        out.println("  <section>");
        out.println("    <title>Description</title>");
        out.println("    <para>");
        out.println(command.description());
        out.println("    </para>");
        out.println("  </section>");

        StringBuffer syntax = new StringBuffer();
        syntax.append(String.format("%s:%s", command.scope(), command.name()));
View Full Code Here

        out.println("h1. " + command.scope() + ":" + command.name());
        out.println();

        out.println("h2. Description");
        out.println(command.description());
        out.println();

        StringBuffer syntax = new StringBuffer();
        syntax.append(String.format("%s:%s", command.scope(), command.name()));
        if (options.size() > 0) {
View Full Code Here

            function = unProxy(function);
            if (function instanceof AbstractCommand) {
                try {
                    Class<? extends Action> actionClass = ((AbstractCommand) function).getActionClass();                   
                    Command ann = new ActionMetaDataFactory().getCommand(actionClass);
                    description = ann.description();
                } catch (Throwable e) {
                }
                if (name.startsWith("*:")) {
                    name = name.substring(2);
                }
View Full Code Here

                @Override
                public String getDescription() {
                    final Command cmd = oldCommand.getActionClass().getAnnotation(Command.class);
                    if (cmd != null) {
                        return cmd.description();
                    } else {
                        return getName();
                    }
                }
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.