public abstract class ResourcePatternScanningOptionHandler
extends org.kohsuke.args4j.spi.OptionHandler<java.lang.String>
OptionHandler
that scans a resource pattern for existing resources (using a single '*' wildcard) and
allows all String values s that would fit if that single wildcard was replaced by s.
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 OptionHandler
and pass the resource pattern as the 4th argument.
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<java.lang.String> |
possibleValues |
Modifier | Constructor and Description |
---|---|
protected |
ResourcePatternScanningOptionHandler(org.kohsuke.args4j.CmdLineParser parser,
org.kohsuke.args4j.OptionDef option,
org.kohsuke.args4j.spi.Setter<java.lang.String> setter,
java.lang.String glob) |
Modifier and Type | Method and Description |
---|---|
protected void |
exclude(java.lang.String... excludes) |
java.lang.String |
getDefaultMetaVariable() |
protected void |
include(java.lang.String... includes) |
int |
parseArguments(org.kohsuke.args4j.spi.Parameters params) |
protected boolean |
shouldConsider(org.springframework.core.io.Resource r)
Whether the matched Spring resource should even be considered for inclusion in the result set.
|
protected ResourcePatternScanningOptionHandler(org.kohsuke.args4j.CmdLineParser parser, org.kohsuke.args4j.OptionDef option, org.kohsuke.args4j.spi.Setter<java.lang.String> setter, java.lang.String glob) throws java.io.IOException
java.io.IOException
public int parseArguments(org.kohsuke.args4j.spi.Parameters params) throws org.kohsuke.args4j.CmdLineException
parseArguments
in class org.kohsuke.args4j.spi.OptionHandler<java.lang.String>
org.kohsuke.args4j.CmdLineException
public java.lang.String getDefaultMetaVariable()
getDefaultMetaVariable
in class org.kohsuke.args4j.spi.OptionHandler<java.lang.String>
protected boolean shouldConsider(org.springframework.core.io.Resource r)
protected void exclude(java.lang.String... excludes)
protected void include(java.lang.String... includes)