Java Doc for Beans.java in  » Apache-Harmony-Java-SE » java-package » java » beans » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » java package » java.beans 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.beans.Beans

Beans
public class Beans (Code)
This class Beans provides some methods for manipulting bean controls.



Constructor Summary
public  Beans()
     Constructs a Beans instance.

Method Summary
public static  ObjectgetInstanceOf(Object bean, Class targetType)
     Obtain an alternative type view of the given bean.
public static  Objectinstantiate(ClassLoader loader, String name)
     Obtains an instance of a JavaBean specified the bean name using the specified class loader.

If the specified class loader is null, the system class loader is used.


Parameters:
  loader - the specified class loader.
public static  Objectinstantiate(ClassLoader cls, String beanName, BeanContext beanContext)
     Obtains an instance of a JavaBean specified the bean name using the specified class loader, and adds the instance into the specified bean context.

If the specified class loader is null, the system class loader is used.


Parameters:
  cls - the specified class loader.
public static  Objectinstantiate(ClassLoader cls, String beanName, BeanContext context, AppletInitializer initializer)
     Obtains an instance of a JavaBean specified by the bean name using the specified class loader, and adds the instance into the specified bean context.

The parameter name must be a qualified name relative to the specified class loader.

public static synchronized  booleanisDesignTime()
     Determine if it's in design-mode.
public static synchronized  booleanisGuiAvailable()
     Returns a boolean indication of whether or not a GUI is available for beans.
public static  booleanisInstanceOf(Object bean, Class targetType)
     Determine if the the specified bean object can be viewed as the specified type.
Parameters:
  bean - the specified bean object.
Parameters:
  targetType - the specifed view type.
public static  voidsetDesignTime(boolean isDesignTime)
     Used to indicate whether of not it's in an application construction environment.
public static synchronized  voidsetGuiAvailable(boolean isGuiAvailable)
     Set whether or not a GUI is available in the bean's current environment.


Constructor Detail
Beans
public Beans()(Code)
Constructs a Beans instance.




Method Detail
getInstanceOf
public static Object getInstanceOf(Object bean, Class targetType)(Code)
Obtain an alternative type view of the given bean. The view type is specified by the parameter type.

If the type view cannot be obtained, the original bean object is returned.


Parameters:
  bean - the original bean object.
Parameters:
  targetType - the specified view type. a type view of the given bean.



instantiate
public static Object instantiate(ClassLoader loader, String name) throws IOException, ClassNotFoundException(Code)
Obtains an instance of a JavaBean specified the bean name using the specified class loader.

If the specified class loader is null, the system class loader is used.


Parameters:
  loader - the specified class loader. It can be null.
Parameters:
  name - the name of the JavaBean an isntance of the bean.
throws:
  IOException -
throws:
  ClassNotFoundException -



instantiate
public static Object instantiate(ClassLoader cls, String beanName, BeanContext beanContext) throws IOException, ClassNotFoundException(Code)
Obtains an instance of a JavaBean specified the bean name using the specified class loader, and adds the instance into the specified bean context.

If the specified class loader is null, the system class loader is used.


Parameters:
  cls - the specified class loader. It can be null.
Parameters:
  beanName - the name of the JavaBean
Parameters:
  beanContext - the beancontext in which the bean instance will be added. an instance of the specified JavaBean.
throws:
  IOException -
throws:
  ClassNotFoundException -



instantiate
public static Object instantiate(ClassLoader cls, String beanName, BeanContext context, AppletInitializer initializer) throws IOException, ClassNotFoundException(Code)
Obtains an instance of a JavaBean specified by the bean name using the specified class loader, and adds the instance into the specified bean context.

The parameter name must be a qualified name relative to the specified class loader. For example, "java.awt.Button" and "x.y.z".

If the specified class loader is null, the system class loader is used.

Firstly, The class Beans regards the bean name as a serialized object name. The class Beans convert bean name into pathname, append a suffix ".ser" to the pathname. then try to load the resource using the specified class loader. If Beans fails to load the resource, Beans will regard the name as a class name and construct a new instance of the bean class.

For example, if the name is specified as "x.y.z", The class Beans will try to load the serialized object from the resource "x/y/z.ser"; If Beans fails to load the resource "x/y/z.ser", it will create a new instance of "x.y.z".

If the bean is an instance of java.applet.Applet, Beans will do some special initialization for this applet bean. First, Beans will set the default AppletStub and AppletContext for the applet bean (If the specified AppletInitializer is not null, Beans will call the AppletInitializer.initialize to set the default AppletStub and AppletContext for the applet bean). Second, Beans will call the init method of the applet. (If the applet bean is loaded as a serialized object, the init method will not be called.)


Parameters:
  cls - the specified class loader. It can be null.
Parameters:
  beanName - the name of the JavaBean
Parameters:
  context - the beancontext in which the bean instance will be added.
Parameters:
  initializer - the AppletInitializer for applet bean instance. Obtains an instance of the JavaBean.
throws:
  IOException -
throws:
  ClassNotFoundException -



isDesignTime
public static synchronized boolean isDesignTime()(Code)
Determine if it's in design-mode. true if it's in an application construction environment.



isGuiAvailable
public static synchronized boolean isGuiAvailable()(Code)
Returns a boolean indication of whether or not a GUI is available for beans. true if a GUI is available, otherwisefalse.



isInstanceOf
public static boolean isInstanceOf(Object bean, Class targetType)(Code)
Determine if the the specified bean object can be viewed as the specified type.
Parameters:
  bean - the specified bean object.
Parameters:
  targetType - the specifed view type. true if the specified bean object can be viewed as the specifiedtype; otherwise, return false;



setDesignTime
public static void setDesignTime(boolean isDesignTime) throws SecurityException(Code)
Used to indicate whether of not it's in an application construction environment.
Parameters:
  isDesignTime - true to indicate that it's in application constructionenvironment.
throws:
  SecurityException -



setGuiAvailable
public static synchronized void setGuiAvailable(boolean isGuiAvailable) throws SecurityException(Code)
Set whether or not a GUI is available in the bean's current environment.
Parameters:
  isGuiAvailable - should be true to signify that a GUI isavailable, false otherwise.
throws:
  SecurityException - if the caller does not have the required permission to accessor modify system properties.



Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.