Annotation Interface DataBoundConstructor


@Retention(RUNTIME) @Target(CONSTRUCTOR) @Documented public @interface DataBoundConstructor
Designates the constructor to be created from methods like StaplerRequest2.bindJSON(Class, JSONObject) and StaplerRequest2.bindParameters(Class, String).

Stapler will invoke the designated constructor by using arguments from the corresponding JSONObject (in case of StaplerRequest2.bindJSON(Class, JSONObject)) or request parameters (in case of StaplerRequest2.bindParameters(Class, String)).

The matching is done by using the constructor parameter name. Since this information is not available at the runtime, annotation processing runs during the compilation to capture them in separate "*.stapler" files.

This replaces "@stapler-constructor" annotation.

Author:
Kohsuke Kawaguchi