/** * Return a string describing the usage of the program this method is called from, given the * options declared in the given class. * This will print both the static options, and the non-static options. * * @param optionsClass The class defining the options being used by this program. * @return A String describing the usage of the class. */ public static String usage(Class<?> optionsClass) { return usage(new Class[]{ optionsClass }); }
/** * Return a string describing the usage of the program this method is called from, given the * options declared in the given object. * This will print both the static options, and the non-static options. * * @param optionsClass The object defining the options being used by this program. * @return A String describing the usage of the class. */ public static String usage(Object optionsClass) { return usage(new Class[]{ optionsClass.getClass() }); }
/** * Return a string describing the usage of the program this method is called from, given the * options declared in the given set of objects. * This will print both the static options, and the non-static options. * * @param optionsClasses The objects defining the options being used by this program. * @return A String describing the usage of the class. */ public static String usage(Object[] optionsClasses) { return usage(Arrays.stream(optionsClasses).map(Object::getClass).toArray(Class[]::new)); }
System.err.println(usage(allClasses.toArray(new Class[0]))); System.exit(0);
/** * Return a string describing the usage of the program this method is called from, given the * options declared in the given class. * This will print both the static options, and the non-static options. * * @param optionsClass The class defining the options being used by this program. * @return A String describing the usage of the class. */ public static String usage(Class<?> optionsClass) { return usage(new Class[]{ optionsClass }); }
/** * Return a string describing the usage of the program this method is called from, given the * options declared in the given class. * This will print both the static options, and the non-static options. * * @param optionsClass The class defining the options being used by this program. * @return A String describing the usage of the class. */ public static String usage(Class<?> optionsClass) { return usage(new Class[]{ optionsClass }); }
/** * Return a string describing the usage of the program this method is called from, given the * options declared in the given object. * This will print both the static options, and the non-static options. * * @param optionsClass The object defining the options being used by this program. * @return A String describing the usage of the class. */ public static String usage(Object optionsClass) { return usage(new Class[]{ optionsClass.getClass() }); }
/** * Return a string describing the usage of the program this method is called from, given the * options declared in the given object. * This will print both the static options, and the non-static options. * * @param optionsClass The object defining the options being used by this program. * @return A String describing the usage of the class. */ public static String usage(Object optionsClass) { return usage(new Class[]{ optionsClass.getClass() }); }
/** * Return a string describing the usage of the program this method is called from, given the * options declared in the given set of objects. * This will print both the static options, and the non-static options. * * @param optionsClasses The objects defining the options being used by this program. * @return A String describing the usage of the class. */ public static String usage(Object[] optionsClasses) { return usage(Arrays.stream(optionsClasses).map(Object::getClass).toArray(Class[]::new)); }
/** * Return a string describing the usage of the program this method is called from, given the * options declared in the given set of objects. * This will print both the static options, and the non-static options. * * @param optionsClasses The objects defining the options being used by this program. * @return A String describing the usage of the class. */ public static String usage(Object[] optionsClasses) { return usage(Arrays.stream(optionsClasses).map(Object::getClass).toArray(Class[]::new)); }
System.err.println(usage(allClasses.toArray(new Class[0]))); System.exit(0);
System.err.println(usage(allClasses.toArray(new Class[0]))); System.exit(0);