In this case we do not define an instance variable in the injectee, but an abstract method returning the required object. The method may be public or protected
在这个例子中,我们没有在被注入者中定义一个实例变量,而是定义了一个返回所需对象的抽象方法。
There are many ways to write bad code. One is to use very abstract function and variable names such as routineX48, PerformDataFunction, DoIt, HandleStuff, and do_args_method.
有很多途径导致坏的代码,其中之一就是使用非常抽象的函数名和变量名,比如routineX48,PerformDataFunction,DoIt,HandleStuff,do_args_method。
These are marked as abstract, which results in Tapestry implementing them as simple "getter" and "setter" methods and creating a new variable for this class, of the type Order.
这两个方法被标记为抽象的,这样Tapestry会把它们实现为简单的“getter”和“setter”方法,并为这个类创建类型为Order的新变量。
应用推荐