< prev index next >

src/jdk.unsupported/share/classes/com/sun/nio/file/ExtendedOpenOption.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -24,10 +24,11 @@
  */
 
 package com.sun.nio.file;
 
 import java.nio.file.OpenOption;
+import sun.nio.fs.ExtendedOptions;
 
 /**
  * Defines <em>extended</em> open options supported on some platforms
  * by Sun's provider implementation.
  *

@@ -36,15 +37,19 @@
 
 public enum ExtendedOpenOption implements OpenOption {
     /**
      * Prevent operations on the file that request read access.
      */
-    NOSHARE_READ,
+    NOSHARE_READ(ExtendedOptions.NOSHARE_READ),
     /**
      * Prevent operations on the file that request write access.
      */
-    NOSHARE_WRITE,
+    NOSHARE_WRITE(ExtendedOptions.NOSHARE_WRITE),
     /**
      * Prevent operations on the file that request delete access.
      */
-    NOSHARE_DELETE;
+    NOSHARE_DELETE(ExtendedOptions.NOSHARE_DELETE);
+
+    ExtendedOpenOption(ExtendedOptions.InternalOption<Void> option) {
+        option.register(this);
+    }
 }
< prev index next >