我有一个ReentrantReadWriteLock
. 包含ReadLockReentrantReadWriteLock
和 WriteLock 作为子类。
I want to extend this ReadLock and WriteLock by my custom classes as
DummyReadLock and DummyWriteLock.
然后我必须能够做类似下面的事情
final Lock lock = new DummyReadLock.readLock();
或者
final Lock lock = new DummyWriteLock.writeLock();
是否有可能实现这一目标。