changeset 76:0d0d2c265612

8068039: Annotate upper stack native methods with field usages Summary: Changes are required for JavaME only Reviewed-by: snazarki Contributed-by: alexey.mironov@oracle.com
author snazarki
date Tue, 23 Dec 2014 15:43:21 +0400
parents 9a36714478e0
children 8109a64f0ee6
files src/se/classes/impl/apimarker/API.java src/se/classes/impl/romizer/Local.java src/se/classes/impl/romizer/WeakDontRenameClass.java src/se/classes/jdk/dio/mmio/AccessOutOfBoundsException.java src/se/classes/jdk/dio/mmio/MMIODevice.java src/se/classes/jdk/dio/mmio/MMIODeviceConfig.java src/se/classes/jdk/dio/mmio/MMIOEvent.java src/se/classes/jdk/dio/mmio/MMIOEventListener.java src/se/classes/jdk/dio/mmio/MMIOPermission.java src/se/classes/jdk/dio/mmio/RawBlock.java src/se/classes/jdk/dio/mmio/RawMemory.java src/se/classes/jdk/dio/mmio/RawRegister.java src/share/classes/com/oracle/dio/gpio/impl/GPIOPinFactory.java src/share/classes/com/oracle/dio/gpio/impl/GPIOPinImpl.java src/share/classes/com/oracle/dio/gpio/impl/GPIOPortFactory.java src/share/classes/com/oracle/dio/gpio/impl/GPIOPortImpl.java src/share/classes/com/oracle/dio/i2cbus/impl/I2CDeviceFactory.java src/share/classes/com/oracle/dio/i2cbus/impl/I2CSlaveImpl.java src/share/classes/com/oracle/dio/spibus/impl/SPIDeviceFactory.java src/share/classes/com/oracle/dio/spibus/impl/SPISlaveImpl.java src/share/classes/com/oracle/dio/uart/impl/ModemUARTFactory.java src/share/classes/com/oracle/dio/uart/impl/ModemUARTImpl.java src/share/classes/com/oracle/dio/uart/impl/UARTFactory.java src/share/classes/com/oracle/dio/uart/impl/UARTImpl.java src/share/classes/jdk/dio/AsyncErrorHandler.java src/share/classes/jdk/dio/BufferAccess.java src/share/classes/jdk/dio/ClosedDeviceException.java src/share/classes/jdk/dio/Device.java src/share/classes/jdk/dio/DeviceAlreadyExistsException.java src/share/classes/jdk/dio/DeviceConfig.java src/share/classes/jdk/dio/DeviceDescriptor.java src/share/classes/jdk/dio/DeviceEvent.java src/share/classes/jdk/dio/DeviceEventListener.java src/share/classes/jdk/dio/DeviceException.java src/share/classes/jdk/dio/DeviceManager.java src/share/classes/jdk/dio/DeviceMgmtPermission.java src/share/classes/jdk/dio/DeviceNotFoundException.java src/share/classes/jdk/dio/DevicePermission.java src/share/classes/jdk/dio/InputRoundListener.java src/share/classes/jdk/dio/InvalidDeviceConfigException.java src/share/classes/jdk/dio/OutputRoundListener.java src/share/classes/jdk/dio/RegistrationEvent.java src/share/classes/jdk/dio/RegistrationListener.java src/share/classes/jdk/dio/RoundCompletionEvent.java src/share/classes/jdk/dio/Transactional.java src/share/classes/jdk/dio/UnavailableDeviceException.java src/share/classes/jdk/dio/UnsupportedAccessModeException.java src/share/classes/jdk/dio/UnsupportedDeviceTypeException.java src/share/classes/jdk/dio/adc/ADCChannel.java src/share/classes/jdk/dio/adc/ADCChannelConfig.java src/share/classes/jdk/dio/adc/ADCPermission.java src/share/classes/jdk/dio/adc/AcquisitionRoundListener.java src/share/classes/jdk/dio/adc/InvalidInputSamplingRateException.java src/share/classes/jdk/dio/adc/MonitoringEvent.java src/share/classes/jdk/dio/adc/MonitoringListener.java src/share/classes/jdk/dio/atcmd/ATDevice.java src/share/classes/jdk/dio/atcmd/ATDeviceConfig.java src/share/classes/jdk/dio/atcmd/ATModem.java src/share/classes/jdk/dio/atcmd/ATPermission.java src/share/classes/jdk/dio/atcmd/CommandResponseHandler.java src/share/classes/jdk/dio/atcmd/DataConnection.java src/share/classes/jdk/dio/atcmd/DataConnectionHandler.java src/share/classes/jdk/dio/atcmd/UnsolicitedResponseHandler.java src/share/classes/jdk/dio/counter/CounterPermission.java src/share/classes/jdk/dio/counter/CountingEvent.java src/share/classes/jdk/dio/counter/CountingListener.java src/share/classes/jdk/dio/counter/PulseCounter.java src/share/classes/jdk/dio/counter/PulseCounterConfig.java src/share/classes/jdk/dio/dac/DACChannel.java src/share/classes/jdk/dio/dac/DACChannelConfig.java src/share/classes/jdk/dio/dac/DACPermission.java src/share/classes/jdk/dio/dac/GenerationRoundListener.java src/share/classes/jdk/dio/dac/InvalidOutputSamplingRateException.java src/share/classes/jdk/dio/generic/GenericBufferIODevice.java src/share/classes/jdk/dio/generic/GenericDevice.java src/share/classes/jdk/dio/generic/GenericDeviceConfig.java src/share/classes/jdk/dio/generic/GenericDeviceControl.java src/share/classes/jdk/dio/generic/GenericEvent.java src/share/classes/jdk/dio/generic/GenericEventListener.java src/share/classes/jdk/dio/generic/GenericPermission.java src/share/classes/jdk/dio/gpio/GPIOPin.java src/share/classes/jdk/dio/gpio/GPIOPinConfig.java src/share/classes/jdk/dio/gpio/GPIOPinPermission.java src/share/classes/jdk/dio/gpio/GPIOPort.java src/share/classes/jdk/dio/gpio/GPIOPortConfig.java src/share/classes/jdk/dio/gpio/GPIOPortPermission.java src/share/classes/jdk/dio/gpio/PinEvent.java src/share/classes/jdk/dio/gpio/PinListener.java src/share/classes/jdk/dio/gpio/PortEvent.java src/share/classes/jdk/dio/gpio/PortListener.java src/share/classes/jdk/dio/i2cbus/I2CCombinedMessage.java src/share/classes/jdk/dio/i2cbus/I2CDevice.java src/share/classes/jdk/dio/i2cbus/I2CDeviceConfig.java src/share/classes/jdk/dio/i2cbus/I2CPermission.java src/share/classes/jdk/dio/modem/ModemSignalEvent.java src/share/classes/jdk/dio/modem/ModemSignalListener.java src/share/classes/jdk/dio/modem/ModemSignalsControl.java src/share/classes/jdk/dio/power/PowerManaged.java src/share/classes/jdk/dio/power/PowerSavingHandler.java src/share/classes/jdk/dio/pwm/GenerationEvent.java src/share/classes/jdk/dio/pwm/GenerationListener.java src/share/classes/jdk/dio/pwm/GenerationRoundListener.java src/share/classes/jdk/dio/pwm/InvalidPulseRateException.java src/share/classes/jdk/dio/pwm/PWMChannel.java src/share/classes/jdk/dio/pwm/PWMChannelConfig.java src/share/classes/jdk/dio/pwm/PWMPermission.java src/share/classes/jdk/dio/spi/AbstractDevice.java src/share/classes/jdk/dio/spi/DeviceProvider.java src/share/classes/jdk/dio/spibus/InvalidWordLengthException.java src/share/classes/jdk/dio/spibus/SPIDevice.java src/share/classes/jdk/dio/spibus/SPIDeviceConfig.java src/share/classes/jdk/dio/spibus/SPIPermission.java src/share/classes/jdk/dio/uart/ModemUART.java src/share/classes/jdk/dio/uart/UART.java src/share/classes/jdk/dio/uart/UARTConfig.java src/share/classes/jdk/dio/uart/UARTEvent.java src/share/classes/jdk/dio/uart/UARTEventListener.java src/share/classes/jdk/dio/uart/UARTPermission.java src/share/classes/jdk/dio/watchdog/WatchdogTimer.java src/share/classes/jdk/dio/watchdog/WatchdogTimerConfig.java src/share/classes/jdk/dio/watchdog/WatchdogTimerPermission.java src/share/classes/jdk/dio/watchdog/WindowedWatchdogTimer.java
diffstat 122 files changed, 489 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/se/classes/impl/apimarker/API.java	Tue Dec 23 15:43:21 2014 +0400
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+package apimarker;
+
+public @interface API {
+    String value();
+    boolean internal() default false;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/se/classes/impl/romizer/Local.java	Tue Dec 23 15:43:21 2014 +0400
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ */
+
+package romizer;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
+public @interface Local {
+    String[] DontRemoveClasses() default {};
+    String[] DontRenameClasses() default {};
+    String[] DontRemoveFields() default {};
+    String[] DontRenameFields() default {};
+    String[] DontRenameMethods() default {};
+    String[] WeakDontRenameClasses() default {};
+    String[] DontRenameSubtypes() default {};
+    String[] WeakDontRenameSubtypes() default {};
+    String[] DontRenameNonAbstractSubtypes() default {};
+    String[] DontRenameFieldsClasses() default {};
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/se/classes/impl/romizer/WeakDontRenameClass.java	Tue Dec 23 15:43:21 2014 +0400
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2014, 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
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package romizer;
+
+public @interface WeakDontRenameClass {
+}
--- a/src/se/classes/jdk/dio/mmio/AccessOutOfBoundsException.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/se/classes/jdk/dio/mmio/AccessOutOfBoundsException.java	Tue Dec 23 15:43:21 2014 +0400
@@ -29,6 +29,8 @@
  *
  * @since 1.0
  */
+@SuppressWarnings("serial")
+@apimarker.API("device-io_1.0")
 public class AccessOutOfBoundsException extends RuntimeException {
 
     /**
--- a/src/se/classes/jdk/dio/mmio/MMIODevice.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/se/classes/jdk/dio/mmio/MMIODevice.java	Tue Dec 23 15:43:21 2014 +0400
@@ -30,6 +30,7 @@
 import jdk.dio.UnavailableDeviceException;
 import java.io.IOException;
 import java.nio.ByteBuffer;
+import romizer.WeakDontRenameClass;
 
 /**
  * The {@code MMIODevice} class provides methods to retrieve memory-mapped registers and memory blocks of a device
@@ -75,6 +76,8 @@
  * @see ClosedDeviceException
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public interface MMIODevice extends Device<MMIODevice> {
 
     /**
@@ -275,4 +278,4 @@
      */
     void setMMIOEventListener(int eventId, String capturedName, MMIOEventListener listener) throws IOException,
             UnavailableDeviceException, ClosedDeviceException;
-}
\ No newline at end of file
+}
--- a/src/se/classes/jdk/dio/mmio/MMIODeviceConfig.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/se/classes/jdk/dio/mmio/MMIODeviceConfig.java	Tue Dec 23 15:43:21 2014 +0400
@@ -30,6 +30,9 @@
 import java.util.Arrays;
 import java.util.Objects;
 
+import serializator.*;
+import romizer.*;
+
 /**
  * The {@code MMIODeviceConfig} class encapsulates the hardware addressing information, and static and dynamic
  * configuration parameters of an MMIO device.
@@ -46,6 +49,9 @@
  * @see DeviceManager#open(Class, DeviceConfig)
  * @since 1.0
  */
+@SerializeMe
+@DontRenameClass
+@apimarker.API("device-io_1.0")
 public final class MMIODeviceConfig implements DeviceConfig<MMIODevice>, DeviceConfig.HardwareAddressing {
 
     /**
@@ -130,6 +136,9 @@
     /**
      * The {@code RawMemoryConfig} class encapsulates the configuration parameters of a generic raw memory area.
      */
+    @SerializeMe
+    @DontRenameClass
+    @apimarker.API("device-io_1.0")
     public static abstract class RawMemoryConfig {
 
         private String name;
--- a/src/se/classes/jdk/dio/mmio/MMIOEvent.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/se/classes/jdk/dio/mmio/MMIOEvent.java	Tue Dec 23 15:43:21 2014 +0400
@@ -34,6 +34,7 @@
  * @see MMIOEventListener
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class MMIOEvent extends DeviceEvent<MMIODevice> {
 
     /**
--- a/src/se/classes/jdk/dio/mmio/MMIOEventListener.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/se/classes/jdk/dio/mmio/MMIOEventListener.java	Tue Dec 23 15:43:21 2014 +0400
@@ -36,6 +36,7 @@
  * @see MMIOEvent
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface MMIOEventListener extends DeviceEventListener {
 
     /**
--- a/src/se/classes/jdk/dio/mmio/MMIOPermission.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/se/classes/jdk/dio/mmio/MMIOPermission.java	Tue Dec 23 15:43:21 2014 +0400
@@ -24,10 +24,9 @@
  */
 package jdk.dio.mmio;
 
-import jdk.dio.DeviceManager;
+import com.oracle.dio.utils.ActionFactory;
+
 import jdk.dio.DevicePermission;
-import java.security.Permission;
-import java.security.PermissionCollection;
 
 /**
  * The {@code MMIOPermission} class defines permissions for MMIO device access.
@@ -54,9 +53,10 @@
  *
  * @see DeviceManager#open DeviceManager.open
  * @see jdk.dio.power.PowerManaged
- * @since 1.0
  */
-public class MMIOPermission extends DevicePermission {
+@SuppressWarnings("serial")
+@apimarker.API("device-io_1.0")
+public class MMIOPermission extends DevicePermission  {
 
     /**
      * Constructs a new {@code MMIOPermission} with the specified target name and the implicit {@code open} action.
--- a/src/se/classes/jdk/dio/mmio/RawBlock.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/se/classes/jdk/dio/mmio/RawBlock.java	Tue Dec 23 15:43:21 2014 +0400
@@ -39,6 +39,7 @@
  * corresponds to the base address of the raw memory area.
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface RawBlock extends RawMemory {
     /**
      * Gets the complete memory area this {@code RawBlock} is mapped to as a <em>direct</em> {@link ByteBuffer}. The
--- a/src/se/classes/jdk/dio/mmio/RawMemory.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/se/classes/jdk/dio/mmio/RawMemory.java	Tue Dec 23 15:43:21 2014 +0400
@@ -29,6 +29,7 @@
  * device's registers may be mapped to.
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface RawMemory {
 
     /**
--- a/src/se/classes/jdk/dio/mmio/RawRegister.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/se/classes/jdk/dio/mmio/RawRegister.java	Tue Dec 23 15:43:21 2014 +0400
@@ -41,6 +41,7 @@
  *            the type of the value held by the register.
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface RawRegister<T extends Number> extends RawMemory {
 
     /**
--- a/src/share/classes/com/oracle/dio/gpio/impl/GPIOPinFactory.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/com/oracle/dio/gpio/impl/GPIOPinFactory.java	Tue Dec 23 15:43:21 2014 +0400
@@ -35,7 +35,6 @@
 
 import romizer.*;
 
-@DontRenameClass
 public class GPIOPinFactory implements PeripheralFactory<GPIOPin> {
 
     public GPIOPinFactory() {
--- a/src/share/classes/com/oracle/dio/gpio/impl/GPIOPinImpl.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/com/oracle/dio/gpio/impl/GPIOPinImpl.java	Tue Dec 23 15:43:21 2014 +0400
@@ -40,6 +40,8 @@
 import jdk.dio.gpio.GPIOPinPermission;
 import jdk.dio.gpio.PinListener;
 
+import romizer.*;
+
 /* "public" is only for PulseCounterImpl, PWMChannelImpl contructor */
 class GPIOPinImpl extends PowerManagedBase<GPIOPin> implements GPIOPin {
 
@@ -240,19 +242,60 @@
     protected synchronized int getGrpID() {
         return getGrpID0();
     }
-
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.unlock_func_ptr",
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.Handle.lock_func_ptr",
+        "com.oracle.dio.impl.Handle.close_func_ptr",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void openPinByConfig0(int port, int pin, int direction, int mode, int trigger, boolean value, boolean access);
 
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int readPin0() throws IOException;
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void writePin0(boolean value) throws IOException;
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void startNoti0() throws IOException;
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void stopNoti0() throws IOException;
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void setOutputMode0(boolean out);
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native boolean getOutputMode0();
 
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void setTrigger0(int trigger);
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int getTrigger0();
 
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int getGrpID0();
-
 }
--- a/src/share/classes/com/oracle/dio/gpio/impl/GPIOPortFactory.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/com/oracle/dio/gpio/impl/GPIOPortFactory.java	Tue Dec 23 15:43:21 2014 +0400
@@ -35,7 +35,6 @@
 
 import romizer.*;
 
-@DontRenameClass
 public class GPIOPortFactory implements PeripheralFactory<GPIOPort> {
 
     public GPIOPortFactory() {
--- a/src/share/classes/com/oracle/dio/gpio/impl/GPIOPortImpl.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/com/oracle/dio/gpio/impl/GPIOPortImpl.java	Tue Dec 23 15:43:21 2014 +0400
@@ -46,6 +46,8 @@
 import jdk.dio.gpio.GPIOPortPermission;
 import java.security.AccessController;
 
+import romizer.*;
+
 class GPIOPortImpl extends AbstractPeripheral<GPIOPort> implements GPIOPort {
 
     private PortListener listener;
@@ -221,16 +223,54 @@
         }
     }
 
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.unlock_func_ptr",
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.Handle.lock_func_ptr",
+        "com.oracle.dio.impl.Handle.close_func_ptr",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void openPortByConfig0(int[][] portsAndPins, int direction,
                                           int value, boolean access);
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int getMaxVal0();
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int readPort0() throws IOException;
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void writePort0(int value) throws IOException;
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void setOutputMode0(boolean out);
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native boolean getOutputMode0();
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void startNoti0() throws IOException;
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void stopNoti0() throws IOException;
 
+    @Local(DontRemoveFields = {
+        "jdk.dio.gpio.GPIOPortConfig.pins",
+    })
     private native void assignPins0(GPIOPortConfig cfg, GPIOPin[] pins);
 }
 
--- a/src/share/classes/com/oracle/dio/i2cbus/impl/I2CDeviceFactory.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/com/oracle/dio/i2cbus/impl/I2CDeviceFactory.java	Tue Dec 23 15:43:21 2014 +0400
@@ -35,7 +35,6 @@
 
 import romizer.*;
 
-@DontRenameClass
 public class I2CDeviceFactory implements PeripheralFactory<I2CDevice> {
     public I2CDevice create(DeviceDescriptor<I2CDevice> dscr, int mode) throws
         DeviceNotFoundException, UnavailableDeviceException,
--- a/src/share/classes/com/oracle/dio/i2cbus/impl/I2CSlaveImpl.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/com/oracle/dio/i2cbus/impl/I2CSlaveImpl.java	Tue Dec 23 15:43:21 2014 +0400
@@ -38,7 +38,7 @@
 import jdk.dio.i2cbus.*;
 import jdk.dio.i2cbus.I2CDevice.Bus;
 
-import romizer.Hidden;
+import romizer.*;
 
 class I2CSlaveImpl extends PowerManagedBase<I2CDevice> implements I2CDevice {
 
@@ -343,6 +343,17 @@
         return getGrpID0();
     }
 
+    @Local(DontRemoveFields = {
+        "jdk.dio.i2cbus.I2CDeviceConfig.controllerNumber",
+        "jdk.dio.i2cbus.I2CDeviceConfig.clockFrequency",
+        "jdk.dio.i2cbus.I2CDeviceConfig.addressSize",
+        "jdk.dio.i2cbus.I2CDeviceConfig.address",
+        "com.oracle.dio.impl.Handle.unlock_func_ptr",
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.Handle.lock_func_ptr",
+        "com.oracle.dio.impl.Handle.close_func_ptr",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void open0(Object config, boolean isExclusive);
 
     /**
@@ -358,7 +369,20 @@
      *
      * @return number of bytes was transfered over the bus.
      */
+    @Local(DontRemoveFields = {
+        "java.nio.Buffer.position",
+        "java.nio.Buffer.limit",
+        "java.nio.Buffer.flags",
+        "java.nio.Buffer.data",
+        "java.nio.Buffer.arrayOffset",
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int transfer0(boolean write, ByteBuffer dst, int flag);
 
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int getGrpID0();
 }
--- a/src/share/classes/com/oracle/dio/spibus/impl/SPIDeviceFactory.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/com/oracle/dio/spibus/impl/SPIDeviceFactory.java	Tue Dec 23 15:43:21 2014 +0400
@@ -34,7 +34,6 @@
 
 import romizer.*;
 
-@DontRenameClass
 public class SPIDeviceFactory implements PeripheralFactory<SPIDevice> {
 
     public SPIDeviceFactory() {
--- a/src/share/classes/com/oracle/dio/spibus/impl/SPISlaveImpl.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/com/oracle/dio/spibus/impl/SPISlaveImpl.java	Tue Dec 23 15:43:21 2014 +0400
@@ -51,6 +51,7 @@
 import jdk.dio.spibus.SPIDeviceConfig;
 import jdk.dio.spibus.SPIPermission;
 
+import romizer.*;
 /**
  *Implementation of SPISlave Interface.
  */
@@ -599,20 +600,53 @@
         return xfered;
     }
 
-
-
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int begin0() throws IOException, UnsupportedOperationException, IllegalStateException;
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int end0() throws IllegalStateException;
 
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.unlock_func_ptr",
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.Handle.lock_func_ptr",
+        "com.oracle.dio.impl.Handle.close_func_ptr",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void openSPIDeviceByConfig0(int deviceNumber, int address,
                                               int csActive, int clockFrequency,
                                               int clockMode, int wordLen,
                                               int bitOrdering, boolean exclusive);
 
     /* PREREQUISITES: either dst.len must be equals to src.len or dst must null */
+    @Local(DontRemoveFields = {
+        "java.nio.Buffer.position",
+        "java.nio.Buffer.limit",
+        "java.nio.Buffer.data",
+        "java.nio.Buffer.arrayOffset",
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void writeAndRead0(ByteBuffer src, ByteBuffer dst) throws IOException;
 
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int getGrpID0();
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int getWordLength0();
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int getByteOrdering0();
 }
--- a/src/share/classes/com/oracle/dio/uart/impl/ModemUARTFactory.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/com/oracle/dio/uart/impl/ModemUARTFactory.java	Tue Dec 23 15:43:21 2014 +0400
@@ -35,9 +35,6 @@
 import com.oracle.dio.impl.PeripheralFactory;
 import com.oracle.dio.impl.PeripheralDescriptorImpl;
 
-import romizer.*;
-
-@DontRenameClass
 public class ModemUARTFactory implements PeripheralFactory<ModemUART> {
 
     public ModemUARTFactory() {
--- a/src/share/classes/com/oracle/dio/uart/impl/ModemUARTImpl.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/com/oracle/dio/uart/impl/ModemUARTImpl.java	Tue Dec 23 15:43:21 2014 +0400
@@ -40,6 +40,7 @@
 import jdk.dio.uart.ModemUART;
 import jdk.dio.uart.UART;
 
+import romizer.*;
 
 class ModemUARTImpl extends UARTImpl implements ModemUART, ModemSignalDispatcher.SerialSignalListener {
 
@@ -145,7 +146,14 @@
         }
     }
 
-
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void setDTESignalState0( int signalID, boolean state);
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native boolean getDCESignalState0( int signalID);
 };
--- a/src/share/classes/com/oracle/dio/uart/impl/UARTFactory.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/com/oracle/dio/uart/impl/UARTFactory.java	Tue Dec 23 15:43:21 2014 +0400
@@ -35,7 +35,6 @@
 
 import romizer.*;
 
-@DontRenameClass
 public class UARTFactory implements PeripheralFactory<UART> {
 
     public UARTFactory() {
--- a/src/share/classes/com/oracle/dio/uart/impl/UARTImpl.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/com/oracle/dio/uart/impl/UARTImpl.java	Tue Dec 23 15:43:21 2014 +0400
@@ -63,6 +63,8 @@
 import java.security.AccessController;
 import jdk.dio.DevicePermission;
 
+import romizer.*;
+
 class UARTImpl extends PowerManagedBase<UART> implements UART {
     private boolean isWriting;
 
@@ -798,37 +800,121 @@
         throw new java.lang.UnsupportedOperationException();
     }
 
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void removeEventListener0(int eventId);
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void setEventListener0(int eventId);
 
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.unlock_func_ptr",
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.Handle.lock_func_ptr",
+        "com.oracle.dio.impl.Handle.close_func_ptr",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void openUARTByConfig0(byte[] devName, int baudrate, int stopBits, int flowControl, int bitsPerChar, int parity, boolean exclusive);
     /*
      * write0 does not shift the buffer's position, it only returns bytes wrote, in case of asynch operation it must return 0.
      */
+    @Local(DontRemoveFields = {
+        "java.nio.Buffer.position",
+        "java.nio.Buffer.limit",
+        "java.nio.Buffer.data",
+        "java.nio.Buffer.arrayOffset",
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int write0(ByteBuffer src);
+
     /*
      * starts asynch write session
      */
+    @Local(DontRemoveFields = {
+        "java.nio.Buffer.position",
+        "java.nio.Buffer.limit",
+        "java.nio.Buffer.data",
+        "java.nio.Buffer.arrayOffset",
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void writeAsynch0(ByteBuffer src);
     /*
      * read0 does not shift the buffer's position, it only returns bytes read.
      */
+    @Local(DontRemoveFields = {
+        "java.nio.Buffer.position",
+        "java.nio.Buffer.limit",
+        "java.nio.Buffer.data",
+        "java.nio.Buffer.arrayOffset",
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int read0(ByteBuffer src);
 
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int getBaudRate0();
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void setBaudRate0(int baudRate);
 
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int getDataBits0();
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void setDataBits0(int dataBits);
 
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int getParity0();
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int setParity0(int parity);
 
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int getStopBits0();
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int setStopBits0(int stopBits);
 
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void stopWriting0();
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native void stopReading0();
 
+    @Local(DontRemoveFields = {
+        "com.oracle.dio.impl.Handle.native_handle",
+        "com.oracle.dio.impl.AbstractPeripheral.handle",
+    })
     private native int getUartId0();
 }
--- a/src/share/classes/jdk/dio/AsyncErrorHandler.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/AsyncErrorHandler.java	Tue Dec 23 15:43:21 2014 +0400
@@ -37,6 +37,7 @@
  *            the device type that generates the error.
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface AsyncErrorHandler<P extends Device<? super P>> {
 
     /**
--- a/src/share/classes/jdk/dio/BufferAccess.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/BufferAccess.java	Tue Dec 23 15:43:21 2014 +0400
@@ -36,6 +36,7 @@
  *            the I/O buffer type.
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface BufferAccess<B extends Buffer> {
 
     /**
--- a/src/share/classes/jdk/dio/ClosedDeviceException.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/ClosedDeviceException.java	Tue Dec 23 15:43:21 2014 +0400
@@ -33,6 +33,7 @@
  *
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class ClosedDeviceException extends ClosedChannelException {
 
     /**
--- a/src/share/classes/jdk/dio/Device.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/Device.java	Tue Dec 23 15:43:21 2014 +0400
@@ -43,6 +43,7 @@
  *            the device type the descriptor is defined for.
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface Device<P extends Device<? super P>> extends Channel {
 
     /**
--- a/src/share/classes/jdk/dio/DeviceAlreadyExistsException.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/DeviceAlreadyExistsException.java	Tue Dec 23 15:43:21 2014 +0400
@@ -31,6 +31,7 @@
  *
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class DeviceAlreadyExistsException extends DeviceException {
 
     /**
--- a/src/share/classes/jdk/dio/DeviceConfig.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/DeviceConfig.java	Tue Dec 23 15:43:21 2014 +0400
@@ -66,6 +66,7 @@
  * @see InvalidDeviceConfigException
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface DeviceConfig<P extends Device<? super P>> {
 
     /**
--- a/src/share/classes/jdk/dio/DeviceDescriptor.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/DeviceDescriptor.java	Tue Dec 23 15:43:21 2014 +0400
@@ -34,6 +34,7 @@
  *            the device type the descriptor is defined for.
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface DeviceDescriptor<P extends Device<? super P>> {
 
     /**
--- a/src/share/classes/jdk/dio/DeviceEvent.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/DeviceEvent.java	Tue Dec 23 15:43:21 2014 +0400
@@ -36,6 +36,7 @@
  *            the device type the event is defined for.
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public abstract class DeviceEvent<P extends Device<? super P>> {
 
     /**
--- a/src/share/classes/jdk/dio/DeviceEventListener.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/DeviceEventListener.java	Tue Dec 23 15:43:21 2014 +0400
@@ -41,5 +41,6 @@
  *
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface DeviceEventListener {
 }
--- a/src/share/classes/jdk/dio/DeviceException.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/DeviceException.java	Tue Dec 23 15:43:21 2014 +0400
@@ -32,6 +32,7 @@
  *
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class DeviceException extends IOException {
 
     /**
--- a/src/share/classes/jdk/dio/DeviceManager.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/DeviceManager.java	Tue Dec 23 15:43:21 2014 +0400
@@ -39,6 +39,7 @@
 import com.oracle.dio.registry.Registry;
 
 import jdk.dio.spi.DeviceProvider;
+import romizer.Local;
 
 import com.oracle.dio.utils.Constants;
 import com.oracle.dio.utils.PrivilegeController;
@@ -102,6 +103,7 @@
  * @see DeviceConfig
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class DeviceManager {
     /**
      * Exclusive access mode.
@@ -1055,6 +1057,7 @@
         }
     }
 
+    @Local(WeakDontRenameSubtypes = {"jdk.dio.DeviceConfig"})
     private static <P extends Device<? super P>> Class<P> getDefaultType(DeviceConfig<? super P> config)  throws UnsupportedDeviceTypeException {
 
         String fullName = config.getClass().getName();
@@ -1075,6 +1078,7 @@
         return null;
     }
 
+    @Local(DontRenameNonAbstractSubtypes = {"com.oracle.dio.impl.PeripheralFactory"})
     private static PeripheralFactory getFactory(Class clazz) throws UnsupportedDeviceTypeException {
         // get package name of com.oracle.dio.PACAKAGE_NAME.PERIPHERAL_IFACE
         // following code is correct for precompiled peripheral driver that following DAAPI name convention.
--- a/src/share/classes/jdk/dio/DeviceMgmtPermission.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/DeviceMgmtPermission.java	Tue Dec 23 15:43:21 2014 +0400
@@ -90,6 +90,7 @@
  * @see DeviceManager#unregister DeviceManager.unregister
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class DeviceMgmtPermission  extends Permission {
 
     /**
--- a/src/share/classes/jdk/dio/DeviceNotFoundException.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/DeviceNotFoundException.java	Tue Dec 23 15:43:21 2014 +0400
@@ -30,6 +30,7 @@
  *
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class DeviceNotFoundException extends DeviceException {
 
     /**
--- a/src/share/classes/jdk/dio/DevicePermission.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/DevicePermission.java	Tue Dec 23 15:43:21 2014 +0400
@@ -31,6 +31,7 @@
 import java.util.Vector;
 import com.oracle.dio.utils.ExceptionMessage;
 import com.oracle.dio.utils.ActionFactory;
+import romizer.Local;
 
 /**
  * The {@code DevicePermission} abstract class is the superclass of all device permissions.
@@ -95,6 +96,7 @@
  * @see jdk.dio.power.PowerManaged
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public abstract class DevicePermission extends Permission {
 
     /**
@@ -305,6 +307,7 @@
         return true;
     }
 
+    @Local(WeakDontRenameSubtypes = {"jdk.dio.DevicePermission"})
     public String toString(){
         return getClass().getName() + " \'" + getName() + "\' " + getActions();
     }
--- a/src/share/classes/jdk/dio/InputRoundListener.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/InputRoundListener.java	Tue Dec 23 15:43:21 2014 +0400
@@ -42,6 +42,7 @@
  *            the input buffer type.
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface InputRoundListener<P extends Device<? super P>, B extends Buffer> extends DeviceEventListener,
         AsyncErrorHandler<P> {
 
--- a/src/share/classes/jdk/dio/InvalidDeviceConfigException.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/InvalidDeviceConfigException.java	Tue Dec 23 15:43:21 2014 +0400
@@ -30,6 +30,7 @@
  *
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class InvalidDeviceConfigException extends DeviceException {
 
     /**
--- a/src/share/classes/jdk/dio/OutputRoundListener.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/OutputRoundListener.java	Tue Dec 23 15:43:21 2014 +0400
@@ -42,6 +42,7 @@
  *            the output buffer type.
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface OutputRoundListener<P extends Device<? super P>, B extends Buffer> extends
         DeviceEventListener, AsyncErrorHandler<P> {
 
--- a/src/share/classes/jdk/dio/RegistrationEvent.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/RegistrationEvent.java	Tue Dec 23 15:43:21 2014 +0400
@@ -37,6 +37,7 @@
  * @see RegistrationListener
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class RegistrationEvent<P extends Device<? super P>> extends EventObject {
     /**
      * The identifying and descriptive information of the registered or unregistered device.
--- a/src/share/classes/jdk/dio/RegistrationListener.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/RegistrationListener.java	Tue Dec 23 15:43:21 2014 +0400
@@ -39,6 +39,7 @@
  * @see DeviceManager
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface RegistrationListener<P extends Device<? super P>> extends EventListener {
 
     /**
--- a/src/share/classes/jdk/dio/RoundCompletionEvent.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/RoundCompletionEvent.java	Tue Dec 23 15:43:21 2014 +0400
@@ -40,6 +40,7 @@
  * @see OutputRoundListener
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class RoundCompletionEvent<P extends Device<? super P>, B extends Buffer> extends DeviceEvent<P> {
     /**
      * The input or output buffer.
--- a/src/share/classes/jdk/dio/Transactional.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/Transactional.java	Tue Dec 23 15:43:21 2014 +0400
@@ -53,6 +53,7 @@
  *
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface Transactional {
 
     /**
--- a/src/share/classes/jdk/dio/UnavailableDeviceException.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/UnavailableDeviceException.java	Tue Dec 23 15:43:21 2014 +0400
@@ -31,6 +31,7 @@
  *
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class UnavailableDeviceException extends DeviceException {
 
     /**
--- a/src/share/classes/jdk/dio/UnsupportedAccessModeException.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/UnsupportedAccessModeException.java	Tue Dec 23 15:43:21 2014 +0400
@@ -31,6 +31,7 @@
  *
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class UnsupportedAccessModeException extends DeviceException {
 
     /**
--- a/src/share/classes/jdk/dio/UnsupportedDeviceTypeException.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/UnsupportedDeviceTypeException.java	Tue Dec 23 15:43:21 2014 +0400
@@ -31,6 +31,7 @@
  *
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class UnsupportedDeviceTypeException extends DeviceException {
 
     /**
--- a/src/share/classes/jdk/dio/adc/ADCChannel.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/adc/ADCChannel.java	Tue Dec 23 15:43:21 2014 +0400
@@ -32,6 +32,7 @@
 import jdk.dio.UnavailableDeviceException;
 import java.io.IOException;
 import java.nio.*;
+import romizer.WeakDontRenameClass;
 
 /**
  * The {@code ADCChannel} interface provides methods for controlling an ADC (Analog to Digital
@@ -88,6 +89,8 @@
  * @see ADCPermission
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public interface ADCChannel extends Device<ADCChannel>, BufferAccess<IntBuffer> {
 
     /**
--- a/src/share/classes/jdk/dio/adc/ADCChannelConfig.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/adc/ADCChannelConfig.java	Tue Dec 23 15:43:21 2014 +0400
@@ -52,6 +52,7 @@
  * @since 1.0
  */
 @SerializeMe
+@apimarker.API("device-io_1.0")
 public final class ADCChannelConfig implements DeviceConfig<ADCChannel>, DeviceConfig.HardwareAddressing {
     private String controllerName;
     private int channelNumber = DEFAULT;
--- a/src/share/classes/jdk/dio/adc/ADCPermission.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/adc/ADCPermission.java	Tue Dec 23 15:43:21 2014 +0400
@@ -60,6 +60,7 @@
  * @see jdk.dio.power.PowerManaged
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class ADCPermission extends DevicePermission {
 
     /**
--- a/src/share/classes/jdk/dio/adc/AcquisitionRoundListener.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/adc/AcquisitionRoundListener.java	Tue Dec 23 15:43:21 2014 +0400
@@ -41,6 +41,7 @@
  * @see ADCChannel#startAcquisition ADCChannel.startAcquisition
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface AcquisitionRoundListener extends InputRoundListener<ADCChannel, IntBuffer> {
 
     /**
--- a/src/share/classes/jdk/dio/adc/InvalidInputSamplingRateException.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/adc/InvalidInputSamplingRateException.java	Tue Dec 23 15:43:21 2014 +0400
@@ -31,6 +31,7 @@
  *
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class InvalidInputSamplingRateException extends RuntimeException {
 
     /**
--- a/src/share/classes/jdk/dio/adc/MonitoringEvent.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/adc/MonitoringEvent.java	Tue Dec 23 15:43:21 2014 +0400
@@ -37,6 +37,7 @@
  * @see MonitoringListener
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class MonitoringEvent extends DeviceEvent<ADCChannel> {
     /**
      * Indicates that the ADC channel value got back within the defined range.
--- a/src/share/classes/jdk/dio/adc/MonitoringListener.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/adc/MonitoringListener.java	Tue Dec 23 15:43:21 2014 +0400
@@ -37,6 +37,7 @@
  * @see ADCChannel
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface MonitoringListener extends DeviceEventListener, AsyncErrorHandler<ADCChannel> {
 
     /**
--- a/src/share/classes/jdk/dio/atcmd/ATDevice.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/atcmd/ATDevice.java	Tue Dec 23 15:43:21 2014 +0400
@@ -30,6 +30,7 @@
 import jdk.dio.ClosedDeviceException;
 import jdk.dio.UnavailableDeviceException;
 import java.io.IOException;
+import romizer.WeakDontRenameClass;
 
 /**
  * The {@code ATDevice} interface provides methods for controlling a Data Communication Equipment
@@ -123,6 +124,8 @@
  * @see DataConnection
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public interface ATDevice extends Device<ATDevice> {
 
     /**
--- a/src/share/classes/jdk/dio/atcmd/ATDeviceConfig.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/atcmd/ATDeviceConfig.java	Tue Dec 23 15:43:21 2014 +0400
@@ -52,6 +52,7 @@
  * @since 1.0
  */
 @SerializeMe
+@apimarker.API("device-io_1.0")
 public class ATDeviceConfig implements DeviceConfig<ATDevice>, DeviceConfig.HardwareAddressing {
 
     private String controllerName;
--- a/src/share/classes/jdk/dio/atcmd/ATModem.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/atcmd/ATModem.java	Tue Dec 23 15:43:21 2014 +0400
@@ -26,11 +26,14 @@
 package jdk.dio.atcmd;
 
 import jdk.dio.modem.ModemSignalsControl;
+import romizer.WeakDontRenameClass;
 
 /**
  * The {@code ATModem} provides methods for controlling a Data Communication Equipment such as a modem or a cellular
  * module using AT commands and modem control signals.
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public interface ATModem extends ATDevice, ModemSignalsControl<ATModem> {
 }
--- a/src/share/classes/jdk/dio/atcmd/ATPermission.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/atcmd/ATPermission.java	Tue Dec 23 15:43:21 2014 +0400
@@ -62,6 +62,7 @@
  * @see ATDevice#openDataConnection ATDevice.openDataConnection
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class ATPermission extends DevicePermission {
 
     /**
--- a/src/share/classes/jdk/dio/atcmd/CommandResponseHandler.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/atcmd/CommandResponseHandler.java	Tue Dec 23 15:43:21 2014 +0400
@@ -43,6 +43,7 @@
  * @see ATDevice
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface CommandResponseHandler {
 
     /**
--- a/src/share/classes/jdk/dio/atcmd/DataConnection.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/atcmd/DataConnection.java	Tue Dec 23 15:43:21 2014 +0400
@@ -32,6 +32,7 @@
  * connection opened by issuing an AT command (e.g. {@code ATD}).
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface DataConnection extends ByteChannel {
 
     /**
--- a/src/share/classes/jdk/dio/atcmd/DataConnectionHandler.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/atcmd/DataConnectionHandler.java	Tue Dec 23 15:43:21 2014 +0400
@@ -34,6 +34,7 @@
  * {@code DataConnectionHandler}.
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface DataConnectionHandler {
 
     /**
--- a/src/share/classes/jdk/dio/atcmd/UnsolicitedResponseHandler.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/atcmd/UnsolicitedResponseHandler.java	Tue Dec 23 15:43:21 2014 +0400
@@ -41,6 +41,7 @@
  * @see ATDevice
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface UnsolicitedResponseHandler {
     /**
      * Invoked to process an unsolicited result code response.
--- a/src/share/classes/jdk/dio/counter/CounterPermission.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/counter/CounterPermission.java	Tue Dec 23 15:43:21 2014 +0400
@@ -60,6 +60,7 @@
  * @see jdk.dio.power.PowerManaged
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class CounterPermission extends DevicePermission {
 
     /**
--- a/src/share/classes/jdk/dio/counter/CountingEvent.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/counter/CountingEvent.java	Tue Dec 23 15:43:21 2014 +0400
@@ -37,6 +37,7 @@
  * @see CountingListener
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class CountingEvent extends DeviceEvent<PulseCounter> {
     /**
      * Indicates that the pulse counting time interval has expired.
--- a/src/share/classes/jdk/dio/counter/CountingListener.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/counter/CountingListener.java	Tue Dec 23 15:43:21 2014 +0400
@@ -38,6 +38,7 @@
  * @see PulseCounter
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface CountingListener extends DeviceEventListener, AsyncErrorHandler<PulseCounter> {
 
     /**
--- a/src/share/classes/jdk/dio/counter/PulseCounter.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/counter/PulseCounter.java	Tue Dec 23 15:43:21 2014 +0400
@@ -30,6 +30,7 @@
 import jdk.dio.ClosedDeviceException;
 import jdk.dio.UnavailableDeviceException;
 import java.io.IOException;
+import romizer.WeakDontRenameClass;
 
 /**
  * The {@code PulseCounter} interface provides methods for controlling a pulse counter. A pulse
@@ -77,6 +78,8 @@
  * @see CounterPermission
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public interface PulseCounter extends Device<PulseCounter> {
 
     /**
--- a/src/share/classes/jdk/dio/counter/PulseCounterConfig.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/counter/PulseCounterConfig.java	Tue Dec 23 15:43:21 2014 +0400
@@ -58,6 +58,7 @@
  * @since 1.0
  */
 @SerializeMe
+@apimarker.API("device-io_1.0")
 public class PulseCounterConfig implements DeviceConfig<PulseCounter>, DeviceConfig.HardwareAddressing {
 
     /**
--- a/src/share/classes/jdk/dio/dac/DACChannel.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/dac/DACChannel.java	Tue Dec 23 15:43:21 2014 +0400
@@ -32,6 +32,7 @@
 import jdk.dio.UnavailableDeviceException;
 import java.io.IOException;
 import java.nio.IntBuffer;
+import romizer.WeakDontRenameClass;
 
 /**
  * The {@code DACChannel} interface provides methods for controlling a DAC (Digital to Analog
@@ -78,6 +79,8 @@
  * @see GenerationRoundListener
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public interface DACChannel extends Device<DACChannel>, BufferAccess<IntBuffer> {
 
     /**
--- a/src/share/classes/jdk/dio/dac/DACChannelConfig.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/dac/DACChannelConfig.java	Tue Dec 23 15:43:21 2014 +0400
@@ -52,6 +52,7 @@
  * @since 1.0
  */
 @SerializeMe
+@apimarker.API("device-io_1.0")
 public final class DACChannelConfig implements DeviceConfig<DACChannel>, DeviceConfig.HardwareAddressing  {
     private String controllerName;
     private int channelNumber = DEFAULT;
--- a/src/share/classes/jdk/dio/dac/DACPermission.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/dac/DACPermission.java	Tue Dec 23 15:43:21 2014 +0400
@@ -58,6 +58,7 @@
  * @see jdk.dio.power.PowerManaged
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class DACPermission extends DevicePermission {
 
     /**
--- a/src/share/classes/jdk/dio/dac/GenerationRoundListener.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/dac/GenerationRoundListener.java	Tue Dec 23 15:43:21 2014 +0400
@@ -43,6 +43,7 @@
  * @see DACChannel#startGeneration DACChannel.startGeneration
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface GenerationRoundListener extends OutputRoundListener<DACChannel, IntBuffer> {
 
     /**
--- a/src/share/classes/jdk/dio/dac/InvalidOutputSamplingRateException.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/dac/InvalidOutputSamplingRateException.java	Tue Dec 23 15:43:21 2014 +0400
@@ -31,6 +31,7 @@
  *
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class InvalidOutputSamplingRateException extends RuntimeException {
 
     /**
--- a/src/share/classes/jdk/dio/generic/GenericBufferIODevice.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/generic/GenericBufferIODevice.java	Tue Dec 23 15:43:21 2014 +0400
@@ -31,6 +31,7 @@
 import java.io.*;
 import java.nio.*;
 import java.nio.channels.ByteChannel;
+import romizer.WeakDontRenameClass;
 
 /**
  * The {@code GenericBufferIODevice} interface defines generic methods for accessing and controlling
@@ -42,6 +43,8 @@
  * {@link jdk.dio.i2cbus.I2CDevice}.
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public interface GenericBufferIODevice extends GenericDevice, ByteChannel, BufferAccess<ByteBuffer> {
 
     /**
--- a/src/share/classes/jdk/dio/generic/GenericDevice.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/generic/GenericDevice.java	Tue Dec 23 15:43:21 2014 +0400
@@ -30,6 +30,7 @@
 import jdk.dio.Device;
 import jdk.dio.ClosedDeviceException;
 import jdk.dio.UnavailableDeviceException;
+import romizer.WeakDontRenameClass;
 
 /**
  * The {@code GenericDevice} interface defines methods for setting and getting
@@ -67,6 +68,8 @@
  * @see GenericPermission
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public interface GenericDevice extends Device<GenericDevice> {
 
     /**
--- a/src/share/classes/jdk/dio/generic/GenericDeviceConfig.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/generic/GenericDeviceConfig.java	Tue Dec 23 15:43:21 2014 +0400
@@ -52,6 +52,7 @@
  * @since 1.0
  */
 @SerializeMe
+@apimarker.API("device-io_1.0")
 public final class GenericDeviceConfig implements DeviceConfig<GenericDevice>, DeviceConfig.HardwareAddressing {
     private String controllerName;
     private int channelNumber = DEFAULT;
--- a/src/share/classes/jdk/dio/generic/GenericDeviceControl.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/generic/GenericDeviceControl.java	Tue Dec 23 15:43:21 2014 +0400
@@ -39,6 +39,7 @@
  * @see GenericDevice#setControl GenericDevice.setControl
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class GenericDeviceControl<T> {
     private int id = -1;
     private Class<T> type = null;
--- a/src/share/classes/jdk/dio/generic/GenericEvent.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/generic/GenericEvent.java	Tue Dec 23 15:43:21 2014 +0400
@@ -35,6 +35,7 @@
  * @see GenericEventListener
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class GenericEvent extends DeviceEvent<GenericDevice> {
 
     /**
--- a/src/share/classes/jdk/dio/generic/GenericEventListener.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/generic/GenericEventListener.java	Tue Dec 23 15:43:21 2014 +0400
@@ -37,6 +37,7 @@
  * @see GenericEvent
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface GenericEventListener extends DeviceEventListener {
 
     /**
--- a/src/share/classes/jdk/dio/generic/GenericPermission.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/generic/GenericPermission.java	Tue Dec 23 15:43:21 2014 +0400
@@ -58,6 +58,7 @@
  * @see jdk.dio.power.PowerManaged
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class GenericPermission extends DevicePermission {
 
     /**
--- a/src/share/classes/jdk/dio/gpio/GPIOPin.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/gpio/GPIOPin.java	Tue Dec 23 15:43:21 2014 +0400
@@ -30,6 +30,7 @@
 import jdk.dio.DeviceManager;
 import jdk.dio.UnavailableDeviceException;
 import java.io.IOException;
+import romizer.WeakDontRenameClass;
 
 /**
  * The {@code GPIOPin} interface provides methods for controlling a GPIO pin.
@@ -79,6 +80,8 @@
  * @see GPIOPinPermission
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public interface GPIOPin extends Device<GPIOPin> {
 
     /**
--- a/src/share/classes/jdk/dio/gpio/GPIOPinConfig.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/gpio/GPIOPinConfig.java	Tue Dec 23 15:43:21 2014 +0400
@@ -51,6 +51,7 @@
  * @since 1.0
  */
 @SerializeMe
+@apimarker.API("device-io_1.0")
 public final class GPIOPinConfig implements  DeviceConfig<GPIOPin>, DeviceConfig.HardwareAddressing {
 
     /**
--- a/src/share/classes/jdk/dio/gpio/GPIOPinPermission.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/gpio/GPIOPinPermission.java	Tue Dec 23 15:43:21 2014 +0400
@@ -62,6 +62,7 @@
  * @see jdk.dio.power.PowerManaged
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class GPIOPinPermission extends DevicePermission {
 
     /**
--- a/src/share/classes/jdk/dio/gpio/GPIOPort.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/gpio/GPIOPort.java	Tue Dec 23 15:43:21 2014 +0400
@@ -30,6 +30,7 @@
 import jdk.dio.DeviceManager;
 import jdk.dio.UnavailableDeviceException;
 import java.io.IOException;
+import romizer.WeakDontRenameClass;
 
 /**
  * The {@code GPIOPort} interface provides methods for controlling a GPIO port.
@@ -88,6 +89,8 @@
  * @see GPIOPortPermission
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public interface GPIOPort extends Device<GPIOPort> {
 
     /**
--- a/src/share/classes/jdk/dio/gpio/GPIOPortConfig.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/gpio/GPIOPortConfig.java	Tue Dec 23 15:43:21 2014 +0400
@@ -55,6 +55,7 @@
  * @since 1.0
  */
 @SerializeMe
+@apimarker.API("device-io_1.0")
 public final class GPIOPortConfig implements DeviceConfig<GPIOPort> {
 
     /**
--- a/src/share/classes/jdk/dio/gpio/GPIOPortPermission.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/gpio/GPIOPortPermission.java	Tue Dec 23 15:43:21 2014 +0400
@@ -60,6 +60,7 @@
  * @see jdk.dio.power.PowerManaged
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class GPIOPortPermission extends DevicePermission {
 
     /**
--- a/src/share/classes/jdk/dio/gpio/PinEvent.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/gpio/PinEvent.java	Tue Dec 23 15:43:21 2014 +0400
@@ -35,6 +35,7 @@
  * @see PinListener
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class PinEvent extends DeviceEvent<GPIOPin> {
 
     /**
--- a/src/share/classes/jdk/dio/gpio/PinListener.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/gpio/PinListener.java	Tue Dec 23 15:43:21 2014 +0400
@@ -35,6 +35,7 @@
  * @see GPIOPin
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface PinListener extends DeviceEventListener {
 
     /**
--- a/src/share/classes/jdk/dio/gpio/PortEvent.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/gpio/PortEvent.java	Tue Dec 23 15:43:21 2014 +0400
@@ -35,6 +35,7 @@
  * @see PortListener
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class PortEvent extends DeviceEvent<GPIOPort> {
 
     /**
--- a/src/share/classes/jdk/dio/gpio/PortListener.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/gpio/PortListener.java	Tue Dec 23 15:43:21 2014 +0400
@@ -34,6 +34,7 @@
  * @see GPIOPort
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface PortListener {
 
     /**
--- a/src/share/classes/jdk/dio/i2cbus/I2CCombinedMessage.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/i2cbus/I2CCombinedMessage.java	Tue Dec 23 15:43:21 2014 +0400
@@ -68,6 +68,7 @@
  *
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface I2CCombinedMessage {
 
     /**
--- a/src/share/classes/jdk/dio/i2cbus/I2CDevice.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/i2cbus/I2CDevice.java	Tue Dec 23 15:43:21 2014 +0400
@@ -34,6 +34,7 @@
 import java.io.IOException;
 import java.nio.*;
 import java.nio.channels.ByteChannel;
+import romizer.WeakDontRenameClass;
 
 /**
  * The {@code I2CDevice} interface provides methods for sending and receiving data to/from an I2C
@@ -108,6 +109,8 @@
  * @see ClosedDeviceException
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public interface I2CDevice extends Device<I2CDevice>, ByteChannel, Transactional, BufferAccess<ByteBuffer> {
 
     /**
--- a/src/share/classes/jdk/dio/i2cbus/I2CDeviceConfig.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/i2cbus/I2CDeviceConfig.java	Tue Dec 23 15:43:21 2014 +0400
@@ -51,6 +51,7 @@
  * @since 1.0
  */
 @SerializeMe
+@apimarker.API("device-io_1.0")
 public final class I2CDeviceConfig implements DeviceConfig<I2CDevice>, DeviceConfig.HardwareAddressing {
 
     /**
--- a/src/share/classes/jdk/dio/i2cbus/I2CPermission.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/i2cbus/I2CPermission.java	Tue Dec 23 15:43:21 2014 +0400
@@ -60,6 +60,7 @@
  * @see jdk.dio.power.PowerManaged
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class I2CPermission extends DevicePermission {
 
     /**
--- a/src/share/classes/jdk/dio/modem/ModemSignalEvent.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/modem/ModemSignalEvent.java	Tue Dec 23 15:43:21 2014 +0400
@@ -39,6 +39,7 @@
  * @see ModemSignalsControl
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class ModemSignalEvent<P extends Device<? super P>> extends DeviceEvent<P> {
     /**
      * The signal ID.
--- a/src/share/classes/jdk/dio/modem/ModemSignalListener.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/modem/ModemSignalListener.java	Tue Dec 23 15:43:21 2014 +0400
@@ -40,6 +40,7 @@
  *            the device type the listener is defined for.
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface ModemSignalListener<P extends Device<? super P>> extends DeviceEventListener {
 
     /**
--- a/src/share/classes/jdk/dio/modem/ModemSignalsControl.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/modem/ModemSignalsControl.java	Tue Dec 23 15:43:21 2014 +0400
@@ -37,6 +37,7 @@
  *            the device type implementing this interface.
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface ModemSignalsControl<P extends Device<? super P>> {
 
     /**
--- a/src/share/classes/jdk/dio/power/PowerManaged.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/power/PowerManaged.java	Tue Dec 23 15:43:21 2014 +0400
@@ -118,6 +118,7 @@
  * @see PowerSavingHandler
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface PowerManaged {
     /*
      * Consider renaming enablePowerSaving and disablePowerSaving to setPowerSavingDirectives and
--- a/src/share/classes/jdk/dio/power/PowerSavingHandler.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/power/PowerSavingHandler.java	Tue Dec 23 15:43:21 2014 +0400
@@ -47,6 +47,7 @@
  * @see PowerManaged
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface PowerSavingHandler {
 
     /**
--- a/src/share/classes/jdk/dio/pwm/GenerationEvent.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/pwm/GenerationEvent.java	Tue Dec 23 15:43:21 2014 +0400
@@ -36,6 +36,7 @@
  * @see GenerationListener
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class GenerationEvent extends DeviceEvent<PWMChannel> {
 
     /**
--- a/src/share/classes/jdk/dio/pwm/GenerationListener.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/pwm/GenerationListener.java	Tue Dec 23 15:43:21 2014 +0400
@@ -37,6 +37,7 @@
  * @see PWMChannel#startGeneration(int, int, GenerationListener)
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface GenerationListener extends DeviceEventListener, AsyncErrorHandler<PWMChannel> {
 
     /**
--- a/src/share/classes/jdk/dio/pwm/GenerationRoundListener.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/pwm/GenerationRoundListener.java	Tue Dec 23 15:43:21 2014 +0400
@@ -41,6 +41,7 @@
  * @see PWMChannel#startGeneration PWMChannel.startGeneration
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface GenerationRoundListener extends OutputRoundListener<PWMChannel, IntBuffer> {
 
     /**
--- a/src/share/classes/jdk/dio/pwm/InvalidPulseRateException.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/pwm/InvalidPulseRateException.java	Tue Dec 23 15:43:21 2014 +0400
@@ -32,6 +32,7 @@
  * @since 1.0
  */
 @SuppressWarnings("serial")
+@apimarker.API("device-io_1.0")
 public class InvalidPulseRateException extends RuntimeException {
 
     /**
--- a/src/share/classes/jdk/dio/pwm/PWMChannel.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/pwm/PWMChannel.java	Tue Dec 23 15:43:21 2014 +0400
@@ -32,6 +32,7 @@
 import jdk.dio.UnavailableDeviceException;
 import java.io.IOException;
 import java.nio.IntBuffer;
+import romizer.WeakDontRenameClass;
 
 /**
  * The {@code PWMChannel} interface provides methods for controlling a PWM (Pulse Width Modulation) signal generator
@@ -71,6 +72,8 @@
  * @see PWMPermission
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public interface PWMChannel extends Device<PWMChannel>, BufferAccess<IntBuffer> {
 
     /**
--- a/src/share/classes/jdk/dio/pwm/PWMChannelConfig.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/pwm/PWMChannelConfig.java	Tue Dec 23 15:43:21 2014 +0400
@@ -55,6 +55,7 @@
  * @since 1.0
  */
 @SerializeMe
+@apimarker.API("device-io_1.0")
 public class PWMChannelConfig implements DeviceConfig<PWMChannel>, DeviceConfig.HardwareAddressing {
 
     /**
--- a/src/share/classes/jdk/dio/pwm/PWMPermission.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/pwm/PWMPermission.java	Tue Dec 23 15:43:21 2014 +0400
@@ -59,6 +59,7 @@
  * @since 1.0
  */
 @SuppressWarnings("serial")
+@apimarker.API("device-io_1.0")
 public class PWMPermission extends DevicePermission {
 
     /**
--- a/src/share/classes/jdk/dio/spi/AbstractDevice.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/spi/AbstractDevice.java	Tue Dec 23 15:43:21 2014 +0400
@@ -30,6 +30,7 @@
 import jdk.dio.DeviceDescriptor;
 import jdk.dio.UnavailableDeviceException;
 import java.io.IOException;
+import romizer.WeakDontRenameClass;
 
 /**
  * The {@code AbstractDevice} class is the base implementation for
@@ -42,6 +43,8 @@
  * @param <P> the device type the descriptor is defined for.
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public abstract class AbstractDevice<P extends Device<? super P>> implements Device<P> {
 
     /**
--- a/src/share/classes/jdk/dio/spi/DeviceProvider.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/spi/DeviceProvider.java	Tue Dec 23 15:43:21 2014 +0400
@@ -88,6 +88,7 @@
  * @see jdk.dio.DeviceManager#register DeviceManager.register
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface DeviceProvider<P extends Device<? super P>> {
 
     /**
--- a/src/share/classes/jdk/dio/spibus/InvalidWordLengthException.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/spibus/InvalidWordLengthException.java	Tue Dec 23 15:43:21 2014 +0400
@@ -32,6 +32,7 @@
  * @since 1.0
  */
 @SuppressWarnings("serial")
+@apimarker.API("device-io_1.0")
 public class InvalidWordLengthException extends RuntimeException {
 
     /**
--- a/src/share/classes/jdk/dio/spibus/SPIDevice.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/spibus/SPIDevice.java	Tue Dec 23 15:43:21 2014 +0400
@@ -34,6 +34,7 @@
 import java.io.IOException;
 import java.nio.*;
 import java.nio.channels.ByteChannel;
+import romizer.WeakDontRenameClass;
 
 /**
  * The {@code SPIDevice} interface provides methods for transmitting and receiving data to/from an SPI slave device.
@@ -85,6 +86,8 @@
  * @see ClosedDeviceException
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public interface SPIDevice extends Device<SPIDevice>, ByteChannel, Transactional, BufferAccess<ByteBuffer> {
 
     /**
--- a/src/share/classes/jdk/dio/spibus/SPIDeviceConfig.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/spibus/SPIDeviceConfig.java	Tue Dec 23 15:43:21 2014 +0400
@@ -80,6 +80,7 @@
  * @since 1.0
  */
 @SerializeMe
+@apimarker.API("device-io_1.0")
 public final class SPIDeviceConfig implements DeviceConfig<SPIDevice>, DeviceConfig.HardwareAddressing {
 
     /**
--- a/src/share/classes/jdk/dio/spibus/SPIPermission.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/spibus/SPIPermission.java	Tue Dec 23 15:43:21 2014 +0400
@@ -59,6 +59,7 @@
  * @since 1.0
  */
 @SuppressWarnings("serial")
+@apimarker.API("device-io_1.0")
 public class SPIPermission extends DevicePermission {
 
     /**
--- a/src/share/classes/jdk/dio/uart/ModemUART.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/uart/ModemUART.java	Tue Dec 23 15:43:21 2014 +0400
@@ -26,6 +26,7 @@
 package jdk.dio.uart;
 
 import jdk.dio.modem.ModemSignalsControl;
+import romizer.WeakDontRenameClass;
 
 /**
  * The {@code ModemUART} interface provides methods for controlling and accessing a UART (Universal Asynchronous
@@ -40,5 +41,7 @@
  *
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public interface ModemUART extends UART, ModemSignalsControl<ModemUART> {
 }
--- a/src/share/classes/jdk/dio/uart/UART.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/uart/UART.java	Tue Dec 23 15:43:21 2014 +0400
@@ -32,6 +32,7 @@
 import jdk.dio.Device;
 import jdk.dio.DeviceManager;
 import jdk.dio.UnavailableDeviceException;
+import romizer.WeakDontRenameClass;
 import java.io.*;
 import java.nio.ByteBuffer;
 import java.nio.channels.ByteChannel;
@@ -67,6 +68,8 @@
  * @see ClosedDeviceException
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public interface UART extends Device<UART>, ByteChannel, BufferAccess<ByteBuffer> {
 
     /**
--- a/src/share/classes/jdk/dio/uart/UARTConfig.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/uart/UARTConfig.java	Tue Dec 23 15:43:21 2014 +0400
@@ -49,6 +49,7 @@
  * @since 1.0
  */
 @SerializeMe
+@apimarker.API("device-io_1.0")
 public final class UARTConfig implements DeviceConfig<UART>, DeviceConfig.HardwareAddressing {
 
     /**
--- a/src/share/classes/jdk/dio/uart/UARTEvent.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/uart/UARTEvent.java	Tue Dec 23 15:43:21 2014 +0400
@@ -35,6 +35,7 @@
  * @see UARTEventListener
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public class UARTEvent extends DeviceEvent<UART> {
 
     /**
--- a/src/share/classes/jdk/dio/uart/UARTEventListener.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/uart/UARTEventListener.java	Tue Dec 23 15:43:21 2014 +0400
@@ -36,6 +36,7 @@
  * @see UARTEvent
  * @since 1.0
  */
+@apimarker.API("device-io_1.0")
 public interface UARTEventListener extends DeviceEventListener {
 
     /**
--- a/src/share/classes/jdk/dio/uart/UARTPermission.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/uart/UARTPermission.java	Tue Dec 23 15:43:21 2014 +0400
@@ -60,6 +60,7 @@
  * @since 1.0
  */
 @SuppressWarnings("serial")
+@apimarker.API("device-io_1.0")
 public class UARTPermission extends DevicePermission {
 
     /**
--- a/src/share/classes/jdk/dio/watchdog/WatchdogTimer.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/watchdog/WatchdogTimer.java	Tue Dec 23 15:43:21 2014 +0400
@@ -30,6 +30,7 @@
 import jdk.dio.ClosedDeviceException;
 import jdk.dio.UnavailableDeviceException;
 import java.io.IOException;
+import romizer.WeakDontRenameClass;
 
 /**
  * The {@code WatchdogTimer} interface provides methods for controlling a watchdog timer that forces the
@@ -61,6 +62,8 @@
  * {@link ClosedDeviceException} been thrown.
  *
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public interface WatchdogTimer extends Device<WatchdogTimer> {
 
     /**
--- a/src/share/classes/jdk/dio/watchdog/WatchdogTimerConfig.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/watchdog/WatchdogTimerConfig.java	Tue Dec 23 15:43:21 2014 +0400
@@ -48,6 +48,7 @@
  * @see DeviceManager#open(Class, DeviceConfig)
  */
 @SerializeMe
+@apimarker.API("device-io_1.0")
 public class WatchdogTimerConfig implements DeviceConfig<WatchdogTimer>, DeviceConfig.HardwareAddressing {
 
     private String controllerName;
--- a/src/share/classes/jdk/dio/watchdog/WatchdogTimerPermission.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/watchdog/WatchdogTimerPermission.java	Tue Dec 23 15:43:21 2014 +0400
@@ -59,6 +59,7 @@
  * @see jdk.dio.power.PowerManaged
  */
 @SuppressWarnings("serial")
+@apimarker.API("device-io_1.0")
 public class WatchdogTimerPermission extends DevicePermission {
 
     /**
--- a/src/share/classes/jdk/dio/watchdog/WindowedWatchdogTimer.java	Fri Dec 19 14:38:32 2014 +0400
+++ b/src/share/classes/jdk/dio/watchdog/WindowedWatchdogTimer.java	Tue Dec 23 15:43:21 2014 +0400
@@ -27,6 +27,7 @@
 
 import jdk.dio.ClosedDeviceException;
 import java.io.IOException;
+import romizer.WeakDontRenameClass;
 
 /**
  * The {@code WindowedWatchdogTimer} interface provides methods for controlling a watchdog timer that can be used to
@@ -44,6 +45,8 @@
  * acquire the same watchdog timer device.
  *
  */
+@apimarker.API("device-io_1.0")
+@WeakDontRenameClass
 public interface WindowedWatchdogTimer extends WatchdogTimer {
 
     /**