Package org.crsh.cli.impl.descriptor

Examples of org.crsh.cli.impl.descriptor.Help


    //
    InvocationMatch<Instance<A>> match = matcher.parse("--help");
    ParameterMatch<OptionDescriptor> helpMatch = match.getParameter(optionDesc);
    assertNotNull(helpMatch);
    CommandInvoker<Instance<A>, ?> invoker = match.getInvoker();
    Help help = (Help)invoker.invoke(Util.wrap(new A()));
    assertNotNull(help);
    assertSame(desc, help.getDescriptor().getDelegate());

    //
    match = matcher.parse("");
    invoker = match.getInvoker();
    invoker.invoke(Util.wrap(new A()));
View Full Code Here


    //
    InvocationMatch<Instance<b>> match = matcher.parse("--help");
    ParameterMatch<OptionDescriptor> helpMatch = match.getParameter(optionDesc);
    assertNotNull(helpMatch);
    CommandInvoker<Instance<b>, ?> invoker = match.getInvoker();
    Help help = (Help)invoker.invoke(Util.wrap(new b()));
    assertNotNull(help);
    CommandDescriptor mainDescriptor = help.getDescriptor();
    assertEquals("b", mainDescriptor.getName());
    assertSame(null, mainDescriptor.getOwner());
  }
View Full Code Here

TOP

Related Classes of org.crsh.cli.impl.descriptor.Help

Copyright © 2018 www.massapicom. 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.