< prev index next >

src/java.desktop/share/classes/java/beans/Beans.java

Print this page

        

@@ -95,12 +95,14 @@
      * @exception ClassNotFoundException if the class of a serialized
      *              object could not be found.
      * @exception IOException if an I/O error occurs.
      * @since 1.2
      */
-
-    public static Object instantiate(ClassLoader cls, String beanName, BeanContext beanContext) throws IOException, ClassNotFoundException {
+    @SuppressWarnings("deprecation")
+    public static Object instantiate(ClassLoader cls, String beanName,
+                                     BeanContext beanContext)
+            throws IOException, ClassNotFoundException {
         return Beans.instantiate(cls, beanName, beanContext, null);
     }
 
     /**
      * Instantiate a bean.

@@ -151,13 +153,21 @@
      *
      * @exception ClassNotFoundException if the class of a serialized
      *              object could not be found.
      * @exception IOException if an I/O error occurs.
      * @since 1.2
-     */
-    @SuppressWarnings("deprecation")
-    public static Object instantiate(ClassLoader cls, String beanName, BeanContext beanContext, AppletInitializer initializer)
+     *
+     * @deprecated It s recommended to use
+     * {@link #instantiate(ClassLoader, String, BeanContext)}, because the
+     * Applet API is deprecated. See the
+     * <a href="../../java/applet/package-summary.html"> java.applet package
+     * documentation</a> for further information.
+     */
+    @Deprecated(since = "9")
+    public static Object instantiate(ClassLoader cls, String beanName,
+                                     BeanContext beanContext,
+                                     AppletInitializer initializer)
                         throws IOException, ClassNotFoundException {
 
         InputStream ins;
         ObjectInputStream oins = null;
         Object result = null;

@@ -499,11 +509,11 @@
 
 /**
  * Package private support class.  This provides a default AppletContext
  * for beans which are applets.
  */
-@SuppressWarnings("deprecation")
+@Deprecated(since = "9")
 class BeansAppletContext implements AppletContext {
     Applet target;
     Hashtable<URL,Object> imageCache = new Hashtable<>();
 
     BeansAppletContext(Applet target) {

@@ -584,11 +594,11 @@
 
 /**
  * Package private support class.  This provides an AppletStub
  * for beans which are applets.
  */
-@SuppressWarnings("deprecation")
+@Deprecated(since = "9")
 class BeansAppletStub implements AppletStub {
     transient boolean active;
     transient Applet target;
     transient AppletContext context;
     transient URL codeBase;
< prev index next >