Java calling methods from restricted layer

后端 未结 2 1906
半阙折子戏
半阙折子戏 2021-01-16 21:15

I\'m not even sure if this is doable but I want to ask the community for their general opinion.

I have to solve a following problem:

My Project has 2 Layers,

2条回答
  •  走了就别回头了
    2021-01-16 21:39

    This can be achieved by using AspectJ. You can write rules in AspectJ-syntax which will give build-time-errors if not enforced. See the article Archtectual Enforcement with Aid of AspectJ for an example.

提交回复
热议问题