On Wed, May 22, 2019 at 10:41 AM Matt Sicker <msic...@cloudbees.com> wrote:
> For Q1, I'm not sure how data bound constructor works with inherited
> classes.

Only a concrete class may use `@DataBoundConstructor`. It should be a
compile-time error to apply it to an `abstract` class. (If it is not,
fix the annotation processor!)

> For Q2, this has something to do with the Jenkins API for
> Descriptor/Describable. Typically, you can use a no-arg constructor in
> your Descriptor class to call Descriptor's default constructor which
> uses reflection to determine the proper class argument. For more
> advanced scenarios, you may need to pass an explicit class reference
> to the constructor

Some `abstract` subtypes of `Descriptor` include a `protected`
constructor accepting `Class` just in case some concrete subclass does
not use the normal idiom of defining the descriptor as a nested class
of the corresponding `Describable`. Generally you can ignore this
overload.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr28Abr7LkHE6uEAnD0bgJ%2BZkU-F%2Beg3cLnDPMEMuiNFWw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to