| | |
| | | continue; |
| | | } |
| | | |
| | | // Return a generic FQDN for localhost as the default hostname |
| | | // in reference documentation. |
| | | if (isHostNameArgument(a)) { |
| | | a.setDefaultValue("localhost.localdomain"); |
| | | } |
| | | |
| | | // The help argument should be added at the end. |
| | | if (isUsageArgument(a)) { |
| | | helpArgument = a; |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns true if this argument is for setting a hostname. |
| | | * @param a The argument. |
| | | * @return true if this argument is for setting a hostname. |
| | | */ |
| | | boolean isHostNameArgument(final Argument a) { |
| | | final String name = a.getName(); |
| | | return name.equalsIgnoreCase(OPTION_LONG_HOST) |
| | | || name.equalsIgnoreCase(OPTION_LONG_REFERENCED_HOST_NAME) |
| | | || name.equalsIgnoreCase("host1") |
| | | || name.equalsIgnoreCase("host2") |
| | | || name.equalsIgnoreCase("hostSource") |
| | | || name.equalsIgnoreCase("hostDestination"); |
| | | } |
| | | |
| | | /** |
| | | * Returns a map containing information about an argument option. |
| | | * @param a The argument |
| | | * @return A map containing information about an argument option |