/** * Return an InputStream for the man page for the named command. */ public static BufferedReader getManPage(String commandName, CommandModel model) { Class clazz = model.getCommandClass(); if (clazz == null) { return null; } return ManPageFinder.getCommandManPage(commandName, clazz.getName(), Locale.getDefault(), clazz.getClassLoader(), logger); }
/** * Return an InputStream for the man page for the named command. */ public static BufferedReader getManPage(String commandName, CommandModel model) { Class clazz = model.getCommandClass(); if (clazz == null) { return null; } return ManPageFinder.getCommandManPage(commandName, clazz.getName(), Locale.getDefault(), clazz.getClassLoader(), logger); }
/** * Return a BufferedReader for the man page for this command, * or null if not found. */ public BufferedReader getManPage() { String commandName = getName(); if (commandName.length() == 0) throw new IllegalArgumentException("Command name cannot be empty"); // special case "help" --> "asadmin" if (commandName.equals("help")) commandName = "asadmin"; return ManPageFinder.getCommandManPage( commandName, getClass().getName(), Locale.getDefault(), getClass().getClassLoader(), logger); }
/** * Return a BufferedReader for the man page for this command, * or null if not found. */ public BufferedReader getManPage() { String commandName = getName(); if (commandName.length() == 0) throw new IllegalArgumentException("Command name cannot be empty"); // special case "help" --> help for the command if (commandName.equals("help")) commandName = programOpts.getCommandName(); return ManPageFinder.getCommandManPage( commandName, getClass().getName(), Locale.getDefault(), getClass().getClassLoader(), logger); }
/** * Try to find a local version of the man page for this command. */ private BufferedReader getLocalManPage() { logger.fine(strings.get("NoRemoteManPage")); String cmdClass = getCommandClass(getName()); ClassLoader mcl = getModuleClassLoader(); if (cmdClass != null && mcl != null) { return ManPageFinder.getCommandManPage(getName(), cmdClass, Locale.getDefault(), mcl, logger); } return null; }
/** * Try to find a local version of the man page for this command. */ private BufferedReader getLocalManPage() { logger.fine(strings.get("NoRemoteManPage")); String cmdClass = getCommandClass(getName()); ClassLoader mcl = getModuleClassLoader(); if (cmdClass != null && mcl != null) { return ManPageFinder.getCommandManPage(getName(), cmdClass, Locale.getDefault(), mcl, logger); } return null; }
/** * Try to find a local version of the man page for this command. */ private BufferedReader getLocalManPage() { logger.fine(strings.get("NoRemoteManPage")); String cmdClass = getCommandClass(getName()); ClassLoader mcl = getModuleClassLoader(); if (cmdClass != null && mcl != null) { return ManPageFinder.getCommandManPage(getName(), cmdClass, Locale.getDefault(), mcl, logger); } return null; }