每次我们实现 PooledConnection 时,我们都会编写
class MyConnection implements PooledConnection, Connection {
// implement methods of PooledConnection and Connection
}
我想知道为什么PooledConnection
不设计为extends Connection
?因为毕竟aPooledConnection
总是 a 。Connection