Package org.kohsuke.stapler
Annotation Type DataBoundConstructor
-
@Retention(RUNTIME) @Target(CONSTRUCTOR) @Documented public @interface DataBoundConstructor
Designates the constructor to be created from methods likeStaplerRequest.bindJSON(Class, JSONObject)
andStaplerRequest.bindParameters(Class, String)
.Stapler will invoke the designated constructor by using arguments from the corresponding
JSONObject
(in case ofStaplerRequest.bindJSON(Class, JSONObject)
) or request parameters (in case ofStaplerRequest.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