Annotation Type CLIResolver
@Indexed @Retention(RUNTIME) @Target(METHOD) @Documented public @interface CLIResolverAnnotates a resolver method that binds a portion of the command line arguments and parameters to an instance whose
CLIMethodis invoked for the final processing.
Hudson uses the return type of the resolver method to pick the resolver method to use, of all the resolver methods it discovers. That is, if Hudson is looking to find an instance of type
Tfor the current command, it first looks for the resolver method whose return type is
T, then it checks for the base type of
T, and so on.
If the chosen resolver method is an instance method on type
S, the "parent resolver" is then located to resolve an instance of type 'S'. This process repeats until a static resolver method is discovered (since most of Hudson's model objects are anchored to the root
Jenkinsobject, normally that would become the top-most resolver method.)
The resolver method shall never return null — it should instead indicate a failure by throwing
- Kohsuke Kawaguchi
- See Also: