I have a class A, which is an external class and not under my control, but i can design the specs of it.
In my code, I want to attach statically some properties and methods to A. I could inherit from A and attach the new functionality. But, since i don’t know the exact specs of A, I cannot provide the constructors of A in my derived class internalA.
I could use the decorator pattern, but it seems a bit overkill since i want to decorate at build time.
Any suggestion to solve it nicely ?
I believe a reference to the externalA should be sufficient.
But, I may have misunderstood your question.