I have following situation:
I have a package x with class A which uses classes B and C. The access level of classes B and C is package-private. B and C implement the same public Interface I.
For a better organisation of code I would like to group classes B, C and I into another package y, but WITHOUT changing the access level to public.
How can I do this? Are there some other ways than to create a public proxy class D in package y with some static factories producing instances of I?
Kind regards, Rokko_11
Aucun commentaire:
Enregistrer un commentaire