Version 2: Reusable-base aspect
版本2:可重用的方面
Consider the base aspect implemented in Listing 4, which follows the guideline of employing aspect inheritance discussed earlier.
考虑清单4中已实现的基本方面,它遵守了前面讨论的使用方面继承的准则。
Its downside is that the classes have a direct dependency on the base aspect, so the base aspect must always be present in the system.
它的不利之处是类直接依赖于基本方面,因此基本方面必须总是出现在系统中。
Because the requirements will differ according to context, the advice to set up the worker object is best contained in each sub-aspect rather than in the abstract base aspect.
因为要求根据上下文而不同,所以设置工人对象的建议最好是包含在每个子方面中,而不是在抽象的基方面中。
Because the requirements will differ according to context, the advice to set up the worker object is best contained in each sub-aspect rather than in the abstract base aspect.
因为要求根据上下文而不同,所以设置工人对象的建议最好是包含在每个子方面中,而不是在抽象的基方面中。
应用推荐