Background
I am considering a design that includes a public API class containing many nested private classes. I am doing this for the following reasons:
- Why private nesting? They will have no use to any other classes except for by my public API class.
- Why classes in the first place? The objects being represented have a significant amount of functionality that they must be their own classes.
- Why many classes? The functionality of each of the nested classes is too different from one another to be derived from a single kind of class.
Question
With all of what's being stated above, would this design practice be considered "composition" in the strictest sense of the word?
I would say yes, because I am representing a "part-of" system, where the private classes are part-of the public API class and will never exist outside the lifetime of the API class. That being said, for some reason I think there might be something wrong here. I just want to be sure.
internal
).