实现该trait的领域对象只需实现getEntity方法即可,该方法的实现仅仅是返回一个自身引用
The domain object implementing this trait only has to provide the getEntity implementation, in which it simply returns a reference to itself
由于对这个模式使用单操作,对地址或显式地址自身的引用必须作为请求的参数提供。
Since a single operation is used for this pattern, a reference to the address or the explicit address itself must be provided as a parameter on the request.
为了使这一点更方便,插件类实现单模式(singleton pattern):它在私有类变量中存储一个自身的引用。
To facilitate this, the plug-in class implements the singleton pattern: It stores a reference to itself in a private class variable.
应用推荐