MCPcopy Create free account
hub / github.com/bjmashibing/DesignPatterns / Tank

Class Tank

src/main/java/com/mashibing/dp/proxy/v07/Tank.java:17–45  ·  view source on GitHub ↗

问题:我想记录坦克的移动时间 最简单的办法:修改代码,记录时间 问题2:如果无法改变方法源码呢? 用继承? v05:使用代理 v06:代理有各种类型 问题:如何实现代理的各种组合?继承?Decorator? v07:代理的对象改成Movable类型-越来越像decorator了

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected