I have a method which creates the lock.
ReadWriteLock lock = new ReentrantReadWriteLock();
Then I pass this object into a method using Lock Interface.
method(Lock lock)
inside the method I just do the following.
final ReentrantReadWriteLock currentLock = (ReentrantReadWriteLock) lock;