@Override
	public int parseArguments(Parameters params) throws CmdLineException {
		String s = params.getParameter(0);
		if (!possibleValues.contains(s)) {
			String errorMessage = String.format("'%s' is not a valid value. Possible values are %s", s, possibleValues);
			if (this.option instanceof NamedOptionDef) {
				NamedOptionDef named = (NamedOptionDef) this.option;
				errorMessage = String.format("'%s' is not a valid value for option %s. Possible values are %s", s,
						named.name(), possibleValues);
			}
			if (excluded.contains(s)) {
				errorMessage += String.format(
						". Note that '%s' has been explicitly excluded from the list of possible values,"
								+ " even though a resource with that name exists", s);
			}
			throw new CmdLineException(owner, errorMessage);
		}
		setter.addValue(s);
		return 1;
	}
An {@link OptionHandler} that scans a resource pattern for existing resources (using a single '*' wildcard) and
allows all String values <i>s</i> that would fit if that single wildcard was replaced by <i>s</i>.

<p>
Given that an option handler has to appear as an annotation parameter, expected usage is to sublcass this class,
provide the canonical 3 arg constructor to {@link OptionHandler} and pass the resource pattern as the 4th argument.
</p>

@author Eric Bottard
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/server/options/ResourcePatternScanningOptionHandler.java