client.java
来自「《JAVA与模式》附书中源代码」· Java 代码 · 共 27 行
JAVA
27 行
package com.javapatterns.prototype.manager;
public class Client
{
public void registerPrototype()
{
prototype = new ConcretePrototype();
Prototype copytype = (Prototype) prototype.clone();
mgr.add(copytype);
}
/**
* @directed
* @label Creates*/
private PrototypeManager mgr;
/**
* @link aggregation
* @directed
* @label Uses
*/
private Prototype prototype;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?