startNet
startNet

Reputation: 274

Editing an external library

I have an external library in the project:

enter image description here

The project uses methods from this library

For me, the classes in this library are read-only

I need to change the method logic from an external library a little bit

What and how should I do?

Maybe I should create new class in project with the same logic? (+ my changes)

Maybe other solutions?

Upvotes: 0

Views: 547

Answers (1)

Squti
Squti

Reputation: 4497

If you use Kotlin you could use Extension Function to extend class functionalities with no need to extend it. You use Java you could extend the classes and override or add methods to it. There is no need to copy/paste class to add new functionalities.

Upvotes: 1

Related Questions