Hi,
for extending tapestrys internal service classes it's often required to
copy a lot of code because almost everything is private. Why not
changing it to protected to allow others to extend those classes?
Examples:
- to temporary fix https://issues.apache.org/jira/browse/TAP5-2219 I had
to copy the whole class because XMLTokenStream.openStream() is private.
- I'd like to add one more component root that is accessible without
prefix (like "core"). This is a trivial change to
org.apache.tapestry5.internal.services.ComponentClassResolverImpl.locate(String,
Map<String, String>) - but I'd have to copy the whole class because the
method is private.
I had a lot of such situations where I'd like to change minimal
behaviour of tapestry's service classes and failed because of private
fields/methods. I while ago I was told that private is choosen because
the internal classes might change. I think that's a bad reason because
if one overrided stuff in internal classes, he has to deal with such
changes when the framwork version changes. If one copies the code to do
some minimal changes, he'll stuck on the old code when he upgrades
tapestry which might cause much more side-effects than overrding just
one or two methods.
--
Mit freundlichen Grüßen / Kind regards
Michael Wyraz
evermind GmbH
Schorlemmerstraße 1
04155 Leipzig
Tel.:+49 (0)341-25 39 66 - 0 <callto:+493412539660>
Fax:+49 (0)341-25 39 66 - 1 <callto:+493412539661>
Funk:+49 (0)177-73 00 00 3 <callto:+491777300003>
E-Mail: michael.wy...@evermind.de
HRB: 21586
Amtsgericht Leipzig
Geschäftsführer:
Christoph Klemm