@Nullable
    public E get() {
        rwl.readLock().lock();
        try {
            if (object == null || ((System.nanoTime() - lastCreationInNanos) > timeToLiveInNanos)) {
                // Must release read lock before acquiring write lock
                rwl.readLock().unlock();
                rwl.writeLock().lock();
                try {
                    // Recheck state because another thread might have
                    // acquired write lock and changed state before we did.
                    if (object == null || ((System.nanoTime() - lastCreationInNanos) > timeToLiveInNanos)) {
                        object = newObject();
                        lastCreationInNanos = System.nanoTime();
                    }
                } finally {
                    // Downgrade by acquiring read lock before releasing write lock
                    rwl.readLock().lock();
                    rwl.writeLock().unlock();
                }
            }
            return object;
        } finally {
            rwl.readLock().unlock();
        }
    }
@ Nullable public E get ( ) { rwl . readLock ( ) . lock ( ) ; try { if ( object == null || ( ( System . nanoTime ( ) - lastCreationInNanos ) > timeToLiveInNanos ) ) { rwl . readLock ( ) . unlock ( ) ; rwl . writeLock ( ) . lock ( ) ; try { if ( object == null || ( ( System . nanoTime ( ) - lastCreationInNanos ) > timeToLiveInNanos ) ) { object = newObject ( ) ; lastCreationInNanos = System . nanoTime ( ) ; } } finally { rwl . readLock ( ) . lock ( ) ; rwl . writeLock ( ) . unlock ( ) ; } } return object ; } finally { rwl . readLock ( ) . unlock ( ) ; } }
@return the up to date version of the {@code Object} hold by this reference.