Tabnine Logo
Option
Code IndexAdd Tabnine to your IDE (free)

How to use
Option
in
org.apache.felix.gogo.options

Best Java code snippets using org.apache.felix.gogo.options.Option (Showing top 20 results out of 315)

origin: org.apache.felix/org.apache.felix.gogo.shell

    "  -? --help                show help" };
Option opt = Options.compile(usage).parse(argv);
if (opt.isSet("help"))
  opt.usage();
  return null;
List<String> args = opt.args();
BufferedWriter fw = null;
  fw = new BufferedWriter(new FileWriter(file, opt.isSet("append")));
if (opt.isSet("list"))
origin: org.apache.felix/org.apache.felix.gogo.shell

    "  -R, -r --recursive       equivalent to --directories=recurse" };
Option opt = Options.compile(usage).parse(args);
if (opt.isSet("help"))
  opt.usage(); // includes text before Usage:
  return;
if (opt.args().isEmpty())
  throw opt.usageError("PATTERN not specified");
if (opt.isSet("count"))
  System.out.println("count = " + opt.getNumber("count"));
System.out.println("--directories specified: " + opt.isSet("directories"));
System.out.println("directories=" + opt.get("directories"));
origin: at.bestsolution.efxclipse.eclipse/org.apache.felix.gogo.shell

/**
 * script access to Options.
 */
public Option getopt(List<Object> spec, Object[] args)
{
  String[] optSpec = new String[spec.size()];
  for (int i = 0; i < optSpec.length; ++i)
  {
    optSpec[i] = spec.get(i).toString();
  }
  return Options.compile(optSpec).parse(args);
}
origin: org.apache.felix.gogo/shell

/**
 * script access to Options.
 */
public Option getopt(List<Object> spec, Object[] args)
{
  String[] optSpec = new String[spec.size()];
  for (int i = 0; i < optSpec.length; ++i)
  {
    optSpec[i] = spec.get(i).toString();
  }
  return Options.compile(optSpec).parse(args);
}
origin: apache/felix

    "  -? --help                show help" };
Option opt = Options.compile(usage).parse(argv);
if (opt.isSet("help"))
  opt.usage();
  return null;
List<String> args = opt.args();
BufferedWriter fw = null;
  fw = new BufferedWriter(new FileWriter(file, opt.isSet("append")));
if (opt.isSet("list"))
origin: org.apache.felix.gogo/shell

  "  -R, -r --recursive       equivalent to --directories=recurse" };
Option opt = Options.compile(usage).parse(args);
if (opt.isSet("help")) {
  opt.usage(); // includes text before Usage:
  return;
if (opt.args().size() == 0)
  throw opt.usageError("PATTERN not specified");
if (opt.isSet("count"))
  System.out.println("count = " + opt.getNumber("count"));
System.out.println("--directories specified: " + opt.isSet("directories"));
System.out.println("directories=" + opt.get("directories"));
origin: apache/felix

/**
 * script access to Options.
 * @param spec the spec
 * @param args the args
 * @return Option
 */
public Option getopt(List<Object> spec, Object[] args)
{
  String[] optSpec = new String[spec.size()];
  for (int i = 0; i < optSpec.length; ++i)
  {
    optSpec[i] = spec.get(i).toString();
  }
  return Options.compile(optSpec).parse(args);
}
origin: org.apache.felix.gogo/shell

    "  -v --invert-match        select non-matching lines" };
Option opt = Options.compile(usage).parse(argv);
if (opt.isSet("help"))
  opt.usage();
  return true;
List<String> args = opt.args();
  throw opt.usageError("no pattern supplied.");
if (opt.isSet("ignore-case"))
if (opt.isSet("line-number"))
      if (!(matcher.find() ^ !opt.isSet("invert-match")))
        if (opt.isSet("quiet"))
          break;
    if (match && opt.isSet("quiet"))
origin: at.bestsolution.efxclipse.eclipse/org.apache.felix.gogo.shell

  "  -R, -r --recursive       equivalent to --directories=recurse" };
Option opt = Options.compile(usage).parse(args);
if (opt.isSet("help")) {
  opt.usage(); // includes text before Usage:
  return;
if (opt.args().size() == 0)
  throw opt.usageError("PATTERN not specified");
if (opt.isSet("count"))
  System.out.println("count = " + opt.getNumber("count"));
System.out.println("--directories specified: " + opt.isSet("directories"));
System.out.println("directories=" + opt.get("directories"));
origin: org.apache.felix/org.apache.felix.gogo.shell

/**
 * script access to Options.
 * @param spec the spec
 * @param args the args
 * @return Option
 */
public Option getopt(List<Object> spec, Object[] args)
{
  String[] optSpec = new String[spec.size()];
  for (int i = 0; i < optSpec.length; ++i)
  {
    optSpec[i] = spec.get(i).toString();
  }
  return Options.compile(optSpec).parse(args);
}
origin: org.apache.felix.gogo/shell

    "  -? --help                show help" };
Option opt = Options.compile(usage).parse(argv);
if (opt.isSet("help"))
  opt.usage();
  return null;
List<String> args = opt.args();
BufferedWriter fw = null;
  fw = new BufferedWriter(new FileWriter(file, opt.isSet("append")));
if (opt.isSet("list"))
origin: apache/felix

    "  -R, -r --recursive       equivalent to --directories=recurse" };
Option opt = Options.compile(usage).parse(args);
if (opt.isSet("help"))
  opt.usage(); // includes text before Usage:
  return;
if (opt.args().isEmpty())
  throw opt.usageError("PATTERN not specified");
if (opt.isSet("count"))
  System.out.println("count = " + opt.getNumber("count"));
System.out.println("--directories specified: " + opt.isSet("directories"));
System.out.println("directories=" + opt.get("directories"));
origin: at.bestsolution.efxclipse.eclipse/org.apache.felix.gogo.shell

    "  -? --help                show help" };
Option opt = Options.compile(usage).parse(argv);
if (opt.isSet("help"))
  opt.usage();
  return null;
List<String> args = opt.args();
BufferedWriter fw = null;
  fw = new BufferedWriter(new FileWriter(file, opt.isSet("append")));
if (opt.isSet("list"))
origin: apache/felix

    "  -? --help                show help" };
Option opt = Options.compile(usage).parse(argv);
List<String> args = opt.args();
if (opt.isSet("help") || args.isEmpty())
  opt.usage();
  return;
  ip = opt.get("ip");
  port = opt.getNumber("port");
  start();
  status();
  throw opt.usageError("bad command: " + command);
origin: apache/felix

    "If PREFIX given, then only show variable(s) starting with PREFIX" };
Option opt = Options.compile(usage).parse(argv);
if (opt.isSet("help"))
  opt.usage();
  return;
List<String> args = opt.args();
String prefix = (args.isEmpty() ? "" : args.get(0));
if (opt.isSet("x"))
  boolean all = opt.isSet("all");
  for (String key : new TreeSet<>(Shell.getVariables(session)))
origin: org.apache.felix/org.apache.felix.gogo.shell

    "  -? --help                show help" };
Option opt = Options.compile(usage).parse(argv);
List<String> args = opt.args();
if (opt.isSet("help") || args.isEmpty())
  opt.usage();
  return;
  ip = opt.get("ip");
  port = opt.getNumber("port");
  start();
  status();
  throw opt.usageError("bad command: " + command);
origin: org.apache.felix/org.apache.felix.gogo.shell

    "If PREFIX given, then only show variable(s) starting with PREFIX" };
Option opt = Options.compile(usage).parse(argv);
if (opt.isSet("help"))
  opt.usage();
  return;
List<String> args = opt.args();
String prefix = (args.isEmpty() ? "" : args.get(0));
if (opt.isSet("x"))
  boolean all = opt.isSet("all");
  for (String key : new TreeSet<>(Shell.getVariables(session)))
origin: at.bestsolution.efxclipse.eclipse/org.apache.felix.gogo.shell

    "  -? --help                show help" };
Option opt = Options.compile(usage).parse(argv);
List<String> args = opt.args();
if (opt.isSet("help") || args.isEmpty())
  opt.usage();
  return;
      + port);
  ip = opt.get("ip");
  port = opt.getNumber("port");
  start();
  status();
  throw opt.usageError("bad command: " + command);
origin: apache/felix

    "  -v --invert-match        select non-matching lines" };
Option opt = Options.compile(usage).parse(argv);
if (opt.isSet("help"))
  opt.usage();
  return true;
List<String> args = opt.args();
  throw opt.usageError("no pattern supplied.");
if (opt.isSet("ignore-case"))
if (opt.isSet("line-number"))
      if (matcher.find() == !opt.isSet("invert-match"))
        if (opt.isSet("quiet"))
          break;
    if (match && opt.isSet("quiet"))
origin: org.apache.felix.gogo/shell

    "  -? --help                show help" };
Option opt = Options.compile(usage).parse(argv);
List<String> args = opt.args();
if (opt.isSet("help") || args.isEmpty())
  opt.usage();
  return;
      + port);
  ip = opt.get("ip");
  port = opt.getNumber("port");
  start();
  status();
  throw opt.usageError("bad command: " + command);
org.apache.felix.gogo.optionsOption

Most used methods

  • args
    get remaining non-options args as Strings.
  • get
    get value of named option. If multiple options given, this method returns the last one. Use #getList
  • getNumber
    get value of named option as a Number.
  • isSet
    test whether specified option has been explicitly set.
  • parse
    parse arguments.
  • setOptionsFirst
    require options to precede args. Default is false, so options can appear between or after args.
  • usage
    print usage message to System.err.
  • usageError
    print specified usage error to System.err. You should explicitly throw the returned exception.

Popular in Java

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now