QDox

QDox model ctors need to be public

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.6
  • Fix Version/s: 1.6
  • Component/s: Java API
  • Labels:
    None
  • Number of attachments :
    0

Description

Over the last several weeks, the access to the constructors was changed from "public" to "protected". This breaks clients that need to create model objects, including objects created as mock for testing. (The timing of this change is almost more disturbing than the change itself though...)

Some manner of creating objects that conform to the model interfaces must be provided to QDox clients, whether in the form of public constructors, factory interfaces for model objects or JavaDocBuilder, or extracted interfaces.

The final option provides the most flexibility for the QDox maintainers. Extracting interfaces does not at all limit their ability to be changed, but does encourage developers away from the bindings that clients must otherwise make on the internal interfaces of the library. If the interfaces change between versions, so be it. As is true with any jar, a maintainer of a client to that jar must link against that new jar in order to take advantage of the new functionality.

Activity

Hide
Brian Topping added a comment -

Or should we just stick with QFork?

Show
Brian Topping added a comment - Or should we just stick with QFork?
Hide
Mike Williams added a comment -

Apologies; will fix for 1.6.

Show
Mike Williams added a comment - Apologies; will fix for 1.6.
Hide
Mike Williams added a comment -

I've made the constructors on JavaClass, JavaMethod and JavaField public again. Brian, please let me know if I missed any.

By the way, the change that made these constructors protected was not recent, as you suggest ... in fact, it was done back in July '04. Not that I'm claiming it was a good idea; it does indeed help to have some way of creating instances for testing

Show
Mike Williams added a comment - I've made the constructors on JavaClass, JavaMethod and JavaField public again. Brian, please let me know if I missed any. By the way, the change that made these constructors protected was not recent, as you suggest ... in fact, it was done back in July '04. Not that I'm claiming it was a good idea; it does indeed help to have some way of creating instances for testing
Hide
Brian Topping added a comment -

Thanks Mike

Show
Brian Topping added a comment - Thanks Mike

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: