95 * @exception ClassNotFoundException if the class of a serialized |
95 * @exception ClassNotFoundException if the class of a serialized |
96 * object could not be found. |
96 * object could not be found. |
97 * @exception IOException if an I/O error occurs. |
97 * @exception IOException if an I/O error occurs. |
98 * @since 1.2 |
98 * @since 1.2 |
99 */ |
99 */ |
100 |
100 @SuppressWarnings("deprecation") |
101 public static Object instantiate(ClassLoader cls, String beanName, BeanContext beanContext) throws IOException, ClassNotFoundException { |
101 public static Object instantiate(ClassLoader cls, String beanName, |
|
102 BeanContext beanContext) |
|
103 throws IOException, ClassNotFoundException { |
102 return Beans.instantiate(cls, beanName, beanContext, null); |
104 return Beans.instantiate(cls, beanName, beanContext, null); |
103 } |
105 } |
104 |
106 |
105 /** |
107 /** |
106 * Instantiate a bean. |
108 * Instantiate a bean. |
151 * |
153 * |
152 * @exception ClassNotFoundException if the class of a serialized |
154 * @exception ClassNotFoundException if the class of a serialized |
153 * object could not be found. |
155 * object could not be found. |
154 * @exception IOException if an I/O error occurs. |
156 * @exception IOException if an I/O error occurs. |
155 * @since 1.2 |
157 * @since 1.2 |
156 */ |
158 * |
157 @SuppressWarnings("deprecation") |
159 * @deprecated It is recommended to use |
158 public static Object instantiate(ClassLoader cls, String beanName, BeanContext beanContext, AppletInitializer initializer) |
160 * {@link #instantiate(ClassLoader, String, BeanContext)}, |
159 throws IOException, ClassNotFoundException { |
161 * because the Applet API is deprecated. See the |
|
162 * <a href="../../java/applet/package-summary.html"> java.applet package |
|
163 * documentation</a> for further information. |
|
164 */ |
|
165 @Deprecated(since = "9") |
|
166 public static Object instantiate(ClassLoader cls, String beanName, |
|
167 BeanContext beanContext, |
|
168 AppletInitializer initializer) |
|
169 throws IOException, ClassNotFoundException { |
160 |
170 |
161 InputStream ins; |
171 InputStream ins; |
162 ObjectInputStream oins = null; |
172 ObjectInputStream oins = null; |
163 Object result = null; |
173 Object result = null; |
164 boolean serialized = false; |
174 boolean serialized = false; |
499 |
509 |
500 /** |
510 /** |
501 * Package private support class. This provides a default AppletContext |
511 * Package private support class. This provides a default AppletContext |
502 * for beans which are applets. |
512 * for beans which are applets. |
503 */ |
513 */ |
504 @SuppressWarnings("deprecation") |
514 @Deprecated(since = "9") |
505 class BeansAppletContext implements AppletContext { |
515 class BeansAppletContext implements AppletContext { |
506 Applet target; |
516 Applet target; |
507 Hashtable<URL,Object> imageCache = new Hashtable<>(); |
517 Hashtable<URL,Object> imageCache = new Hashtable<>(); |
508 |
518 |
509 BeansAppletContext(Applet target) { |
519 BeansAppletContext(Applet target) { |
584 |
594 |
585 /** |
595 /** |
586 * Package private support class. This provides an AppletStub |
596 * Package private support class. This provides an AppletStub |
587 * for beans which are applets. |
597 * for beans which are applets. |
588 */ |
598 */ |
589 @SuppressWarnings("deprecation") |
599 @Deprecated(since = "9") |
590 class BeansAppletStub implements AppletStub { |
600 class BeansAppletStub implements AppletStub { |
591 transient boolean active; |
601 transient boolean active; |
592 transient Applet target; |
602 transient Applet target; |
593 transient AppletContext context; |
603 transient AppletContext context; |
594 transient URL codeBase; |
604 transient URL codeBase; |