- Class Beans
- Methods declared in class java.lang.Object
- Constructor Details
- Beans
- Method Details
- instantiate
- instantiate
- instantiate
- getInstanceOf
- isInstanceOf
- isDesignTime
- Java lang object bean
- Methods declared in class java.lang.Object
- Constructor Detail
- Beans
- Method Detail
- instantiate
- instantiate
- instantiate
- getInstanceOf
- isInstanceOf
- isDesignTime
- isGuiAvailable
- setDesignTime
- setGuiAvailable
- Class Beans
- Methods declared in class java.lang.Object
- Constructor Details
- Beans
- Method Details
- instantiate
- instantiate
- instantiate
- getInstanceOf
- isInstanceOf
- isDesignTime
- Class Beans
- Methods declared in class java.lang.Object
- Constructor Details
- Beans
- Method Details
- instantiate
- instantiate
- instantiate
- getInstanceOf
- isInstanceOf
- isDesignTime
Class Beans
It is recommended to use instantiate(ClassLoader, String, BeanContext) , because the Applet API is deprecated.
Methods declared in class java.lang.Object
Constructor Details
Beans
Method Details
instantiate
instantiate
instantiate
It is recommended to use instantiate(ClassLoader, String, BeanContext) , because the Applet API is deprecated. See the java.applet package documentation for further information.
Instantiate a bean. The bean is created based on a name relative to a class-loader. This name should be a dot-separated name such as «a.b.c». In Beans 1.0 the given name can indicate either a serialized object or a class. Other mechanisms may be added in the future. In beans 1.0 we first try to treat the beanName as a serialized object name then as a class name. When using the beanName as a serialized object name we convert the given beanName to a resource pathname and add a trailing «.ser» suffix. We then try to load a serialized object from that resource. For example, given a beanName of «x.y», Beans.instantiate would first try to read a serialized object from the resource «x/y.ser» and if that failed it would try to load the class «x.y» and create an instance of that class. If the bean is a subtype of java.applet.Applet, then it is given some special initialization. First, it is supplied with a default AppletStub and AppletContext. Second, if it was instantiated from a classname the applet’s «init» method is called. (If the bean was deserialized this step is skipped.) Note that for beans which are applets, it is the caller’s responsibility to call «start» on the applet. For correct behaviour, this should be done after the applet has been added into a visible AWT container. Note that applets created via beans.instantiate run in a slightly different environment than applets running inside browsers. In particular, bean applets have no access to «parameters», so they may 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).
getInstanceOf
From a given bean, obtain an object representing a specified type view of that source object. The result may be the same object or a different object. If the requested target view isn’t available then the given bean is returned. This method is provided in Beans 1.0 as a hook to allow the addition of more flexible bean behaviour in the future.
isInstanceOf
Check if a bean can be viewed as a given target type. The result will be true if the Beans.getInstanceof method can be used on the given bean to obtain an object that represents the specified targetType type view.
isDesignTime
Java lang object bean
It is recommended to use instantiate(ClassLoader, String, BeanContext) , because the Applet API is deprecated.
Methods declared in class java.lang.Object
Constructor Detail
Beans
Method Detail
instantiate
public static Object instantiate(ClassLoader cls, String beanName) throws IOException, ClassNotFoundException
instantiate
public static Object instantiate(ClassLoader cls, String beanName, BeanContext beanContext) throws IOException, ClassNotFoundException
instantiate
@Deprecated(since="9") public static Object instantiate(ClassLoader cls, String beanName, BeanContext beanContext, AppletInitializer initializer) throws IOException, ClassNotFoundException
It is recommended to use instantiate(ClassLoader, String, BeanContext) , because the Applet API is deprecated. See the java.applet package documentation for further information.
Instantiate a bean. The bean is created based on a name relative to a class-loader. This name should be a dot-separated name such as «a.b.c». In Beans 1.0 the given name can indicate either a serialized object or a class. Other mechanisms may be added in the future. In beans 1.0 we first try to treat the beanName as a serialized object name then as a class name. When using the beanName as a serialized object name we convert the given beanName to a resource pathname and add a trailing «.ser» suffix. We then try to load a serialized object from that resource. For example, given a beanName of «x.y», Beans.instantiate would first try to read a serialized object from the resource «x/y.ser» and if that failed it would try to load the class «x.y» and create an instance of that class. If the bean is a subtype of java.applet.Applet, then it is given some special initialization. First, it is supplied with a default AppletStub and AppletContext. Second, if it was instantiated from a classname the applet’s «init» method is called. (If the bean was deserialized this step is skipped.) Note that for beans which are applets, it is the caller’s responsiblity to call «start» on the applet. For correct behaviour, this should be done after the applet has been added into a visible AWT container. Note that applets created via beans.instantiate run in a slightly different environment than applets running inside browsers. In particular, bean applets have no access to «parameters», so they may 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).
getInstanceOf
public static Object getInstanceOf(Object bean, Class targetType)
From a given bean, obtain an object representing a specified type view of that source object. The result may be the same object or a different object. If the requested target view isn’t available then the given bean is returned. This method is provided in Beans 1.0 as a hook to allow the addition of more flexible bean behaviour in the future.
isInstanceOf
Check if a bean can be viewed as a given target type. The result will be true if the Beans.getInstanceof method can be used on the given bean to obtain an object that represents the specified targetType type view.
isDesignTime
public static boolean isDesignTime()
isGuiAvailable
public static boolean isGuiAvailable()
setDesignTime
Used to indicate whether of not we are running in an application builder environment. Note that this method is security checked and is not available to (for example) untrusted applets. More specifically, if there is a security manager, its checkPropertiesAccess method is called. This could result in a SecurityException.
setGuiAvailable
Used to indicate whether of not we are running in an environment where GUI interaction is available. Note that this method is security checked and is not available to (for example) untrusted applets. More specifically, if there is a security manager, its checkPropertiesAccess method is called. This could result in a SecurityException.
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.
Class Beans
It is recommended to use instantiate(ClassLoader, String, BeanContext) , because the Applet API is deprecated.
Methods declared in class java.lang.Object
Constructor Details
Beans
Method Details
instantiate
instantiate
instantiate
It is recommended to use instantiate(ClassLoader, String, BeanContext) , because the Applet API is deprecated. See the java.applet package documentation for further information.
Instantiate a bean. The bean is created based on a name relative to a class-loader. This name should be a dot-separated name such as «a.b.c». In Beans 1.0 the given name can indicate either a serialized object or a class. Other mechanisms may be added in the future. In beans 1.0 we first try to treat the beanName as a serialized object name then as a class name. When using the beanName as a serialized object name we convert the given beanName to a resource pathname and add a trailing «.ser» suffix. We then try to load a serialized object from that resource. For example, given a beanName of «x.y», Beans.instantiate would first try to read a serialized object from the resource «x/y.ser» and if that failed it would try to load the class «x.y» and create an instance of that class. If the bean is a subtype of java.applet.Applet, then it is given some special initialization. First, it is supplied with a default AppletStub and AppletContext. Second, if it was instantiated from a classname the applet’s «init» method is called. (If the bean was deserialized this step is skipped.) Note that for beans which are applets, it is the caller’s responsiblity to call «start» on the applet. For correct behaviour, this should be done after the applet has been added into a visible AWT container. Note that applets created via beans.instantiate run in a slightly different environment than applets running inside browsers. In particular, bean applets have no access to «parameters», so they may 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).
getInstanceOf
From a given bean, obtain an object representing a specified type view of that source object. The result may be the same object or a different object. If the requested target view isn’t available then the given bean is returned. This method is provided in Beans 1.0 as a hook to allow the addition of more flexible bean behaviour in the future.
isInstanceOf
Check if a bean can be viewed as a given target type. The result will be true if the Beans.getInstanceof method can be used on the given bean to obtain an object that represents the specified targetType type view.
isDesignTime
Class Beans
It is recommended to use instantiate(ClassLoader, String, BeanContext) , because the Applet API is deprecated.
Methods declared in class java.lang.Object
Constructor Details
Beans
Method Details
instantiate
instantiate
instantiate
It is recommended to use instantiate(ClassLoader, String, BeanContext) , because the Applet API is deprecated. See the java.applet package documentation for further information.
Instantiate a bean. The bean is created based on a name relative to a class-loader. This name should be a dot-separated name such as «a.b.c». In Beans 1.0 the given name can indicate either a serialized object or a class. Other mechanisms may be added in the future. In beans 1.0 we first try to treat the beanName as a serialized object name then as a class name. When using the beanName as a serialized object name we convert the given beanName to a resource pathname and add a trailing «.ser» suffix. We then try to load a serialized object from that resource. For example, given a beanName of «x.y», Beans.instantiate would first try to read a serialized object from the resource «x/y.ser» and if that failed it would try to load the class «x.y» and create an instance of that class. If the bean is a subtype of java.applet.Applet, then it is given some special initialization. First, it is supplied with a default AppletStub and AppletContext. Second, if it was instantiated from a classname the applet’s «init» method is called. (If the bean was deserialized this step is skipped.) Note that for beans which are applets, it is the caller’s responsibility to call «start» on the applet. For correct behaviour, this should be done after the applet has been added into a visible AWT container. Note that applets created via beans.instantiate run in a slightly different environment than applets running inside browsers. In particular, bean applets have no access to «parameters», so they may 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).
getInstanceOf
From a given bean, obtain an object representing a specified type view of that source object. The result may be the same object or a different object. If the requested target view isn’t available then the given bean is returned. This method is provided in Beans 1.0 as a hook to allow the addition of more flexible bean behaviour in the future.
isInstanceOf
Check if a bean can be viewed as a given target type. The result will be true if the Beans.getInstanceof method can be used on the given bean to obtain an object that represents the specified targetType type view.