JSR-62 (Final)

java.beans
Class Beans

java.lang.Object
  |
  +--java.beans.Beans

public class Beans
extends Object

This class provides some general purpose beans control methods.


Constructor Summary
Beans()
           
 
Method Summary
static Object instantiate(ClassLoader cls, String beanName)
           Instantiate a JavaBean.
static boolean isDesignTime()
          Test if we are in design-mode.
static boolean isGuiAvailable()
          Determines whether beans can assume a GUI is available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Beans

public Beans()
Method Detail

instantiate

public static Object instantiate(ClassLoader cls,
                                 String beanName)
                          throws IOException,
                                 ClassNotFoundException

Instantiate a JavaBean.

Parameters:
beanName - the name of the bean within the class-loader. For example "sun.beanbox.foobah"
Throws:
ClassNotFoundException - if the class of a serialized object could not be found.
IOException - if an I/O error occurs.

isDesignTime

public static boolean isDesignTime()
Test if we are in design-mode.

This method always returns false in Personal Profile.

Returns:
True if we are running in an application construction environment.

isGuiAvailable

public static boolean isGuiAvailable()
Determines whether beans can assume a GUI is available.

This method always returns true in Personal Profile.

Returns:
True if we are running in an environment where beans can assume that an interactive GUI is available, so they can pop up dialog boxes, etc. This will normally return true in a windowing environment, and will normally return false in a server environment or if an application is running as part of a batch job.
See Also:
Visibility

JSR-62 (Final)

Java and Java 2D are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
Copyright 1993 - 2002 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, California 94303, U.S.A. All Rights Reserved.
Use of this specification is subject to this license.