A way to implement partial classes in java

后端 未结 5 1484
遥遥无期
遥遥无期 2020-12-15 16:13

I have an interface that I want to implement in separate classes after doing a quick google search apparently, Java doesn\'t have partial classes. Is there a way that I ca

5条回答
  •  一生所求
    2020-12-15 17:06

    You can declare methods trough multiple interfaces and then let your concrete classes implement multiple interfaces.

    More over, using java.lang.Proxy you can assemble your service from multiple interfaces and delegate actual method calls to a separate implementation.

提交回复
热议问题