PrototypeMain.java 408 字节
Newer Older
C
chenjianqiang 已提交
1 2 3 4 5 6
package com.pattern.PrototypePattern.materials;

import com.pattern.PrototypePattern.materials.po.Shape;
import com.pattern.PrototypePattern.materials.po.ShapeCache;

/**
C
chenjianqiang 已提交
7
 * 原型模式
C
chenjianqiang 已提交
8 9 10 11 12 13 14 15 16 17 18 19
 * @author lx
 * @date 2021/11/24 14:54
 **/
public class PrototypeMain {
    public void main() {

        ShapeCache.init();
        Shape c = ShapeCache.getShape("c");
        System.err.println(c.getName());

    }
}