I have a ReentrantReadWriteLock
. The ReentrantReadWriteLock
contains ReadLock and WriteLock as subclasses.
I want to extend this ReadLock and WriteLock by my custom classes as
DummyReadLock and DummyWriteLock.
Then I must be able to do something like below
final Lock lock = new DummyReadLock.readLock();
or
final Lock lock = new DummyWriteLock.writeLock();
Is it possible to achieve this.?
You you can: