Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pleeease declare constructors, methods and fields as protected instead of private. :( #114

Open
preston opened this issue Dec 27, 2014 · 5 comments

Comments

@preston
Copy link

preston commented Dec 27, 2014

I have a few minor modifications I need to make to HTTPAnnouncementRequest, HTTPTrackerClient etc for my specific project. Unfortunately, many of these classes make heavy use of private declarations that effectively make them final. That is, cleanly building customizations on top of torrent is project pretty much impossible. Please please pleeeeeease change these declarations to allow things to be easily subclass-able!

For example:

  • HTTPTrackerClient#buildAnnounceRequest
  • HTTPAnnounceRequestMessage - all fields
  • HTTPAnnounceRequestMessage - constructor :(
@mpetazzoni
Copy link
Owner

Composition vs inheritance? Can you achieve what you're looking for through composition instead?

@preston
Copy link
Author

preston commented Jan 5, 2015

Unfortunately not as-is, since a number of the more important methods are a bit large.

@preston
Copy link
Author

preston commented Jan 5, 2015

@mpetazzoni Would you accept a PR if I did some non-functional refactoring to break out a few methods and change some private declarations to protected?

@mpetazzoni
Copy link
Owner

Sure, send away

@preston
Copy link
Author

preston commented Jan 6, 2015

Done! PR submitted as #115.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants