public abstract Watchable watchable ()

Returns the object for which this watch key was created. This method will continue to return the object even after the key is cancelled.

As the WatchService is intended to map directly on to the native file event notification facility (where available) then many of details on how registered objects are watched is highly implementation specific. When watching a directory for changes for example, and the directory is moved or renamed in the file system, there is no guarantee that the watch key will be cancelled and so the object returned by this method may no longer be a valid path to the directory.

Returns:  the object for which this watch key was created