public class HighSensitivityRegistrar
extends java.lang.Object
WatchService to work ~reliably on MacOS where no native hooks but
polling is used.| Constructor and Description |
|---|
HighSensitivityRegistrar() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists() |
java.nio.file.WatchEvent.Modifier |
get()
Returns the SensitivityWatchEventModifier#HIGH if it exists (on sun jvms or
openjdk),
null otherwise. |
protected java.lang.Class<java.nio.file.WatchEvent.Modifier> |
getSensitivityWatchEventModifierClass()
for testing purposes
|
protected boolean |
isMac()
for testing purposes
|
boolean |
isRequired() |
void |
registerService(java.nio.file.Path path,
java.nio.file.WatchEvent.Kind<java.nio.file.Path>[] kinds,
java.nio.file.WatchService service) |
public boolean isRequired()
protected boolean isMac()
public boolean exists()
public java.nio.file.WatchEvent.Modifier get()
null otherwise.public void registerService(java.nio.file.Path path,
java.nio.file.WatchEvent.Kind<java.nio.file.Path>[] kinds,
java.nio.file.WatchService service)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.Class<java.nio.file.WatchEvent.Modifier> getSensitivityWatchEventModifierClass()
throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException