src/share/classes/java/beans/Beans.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, 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
@@ -60,11 +60,11 @@
/**
* <p>
* Instantiate a JavaBean.
* </p>
- *
+ * @return a JavaBean
* @param cls the class-loader from which we should create
* the bean. If this is null, then the system
* class-loader is used.
* @param beanName the name of the bean within the class-loader.
* For example "sun.beanbox.foobah"
@@ -80,10 +80,11 @@
/**
* <p>
* Instantiate a JavaBean.
* </p>
+ * @return a JavaBean
*
* @param cls the class-loader from which we should create
* the bean. If this is null, then the system
* class-loader is used.
* @param beanName the name of the bean within the class-loader.
@@ -135,10 +136,11 @@
* wish to provide property get/set methods to set parameter values. We
* advise bean-applet developers to test their bean-applets against both
* the JDK appletviewer (for a reference browser environment) and the
* BDK BeanBox (for a reference bean container).
*
+ * @return a JavaBean
* @param cls the class-loader from which we should create
* the bean. If this is null, then the system
* class-loader is used.
* @param beanName the name of the bean within the class-loader.
* For example "sun.beanbox.foobah"
@@ -359,10 +361,12 @@
* bean is returned.
* <p>
* This method is provided in Beans 1.0 as a hook to allow the
* addition of more flexible bean behaviour in the future.
*
+ * @return an object representing a specified type view of the
+ * source object
* @param bean Object from which we want to obtain a view.
* @param targetType The type of view we'd like to get.
*
*/
public static Object getInstanceOf(Object bean, Class<?> targetType) {
@@ -382,11 +386,10 @@
*/
public static boolean isInstanceOf(Object bean, Class<?> targetType) {
return Introspector.isSubclass(bean.getClass(), targetType);
}
-
/**
* Test if we are in design-mode.
*
* @return True if we are running in an application construction
* environment.