Java Doc for Introspector.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.Introspector

Introspector
public class Introspector extends java.lang.Object (Code)
The Introspector is a utility for developers to figure out which properties, events, and methods a JavaBean supports.

The Introspector class walks over the class/superclass chain of the target bean class. At each level it checks if there is a matching BeanInfo class which provides explicit information about the bean, and if so uses that explicit information. Otherwise it uses the low level reflection APIs to study the target class and uses design patterns to analyze its behaviour and then proceeds to continue the introspection with its baseclass.

To look for the explicit information of a bean:

  1. The Introspector appends "BeanInfo" to the qualified name of the bean class, try to use the new class as the "BeanInfo" class. If the "BeanInfo" class exsits and returns non-null value when queried for explicit information, use the explicit information
  2. If the first step fails, the Introspector will extract a simple class name of the bean class by removing the package name from the qualified name of the bean class, append "BeanInfo" to it. And look for the simple class name in the packages defined in the "BeanInfo" search path (The default "BeanInfo" search path is sun.beans.infos). If it finds a "BeanInfo" class and the "BeanInfo" class returns non-null value when queried for explicit information, use the explicit information


Field Summary
final public static  intIGNORE_ALL_BEANINFO
     Constant values to indicate that the Introspector will ignore all BeanInfo class.
final public static  intIGNORE_IMMEDIATE_BEANINFO
     Constant values to indicate that the Introspector will ignore the BeanInfo class of the current bean class.
final public static  intUSE_ALL_BEANINFO
     Constant values to indicate that the Introspector will use all BeanInfo class which have been found.


Method Summary
public static  Stringdecapitalize(String name)
    
public static  voidflushCaches()
     Flushes all BeanInfo caches.
public static  voidflushFromCaches(Class clazz)
    
public static  BeanInfogetBeanInfo(Class beanClass)
     Gets the BeanInfo object which contains the information of the properties, events and methods of the specified bean class.

The Introspector will cache the BeanInfo object.

public static  BeanInfogetBeanInfo(Class beanClass, Class stopClass)
     Gets the BeanInfo object which contains the information of the properties, events and methods of the specified bean class.
public static  BeanInfogetBeanInfo(Class beanClass, int flags)
     Gets the BeanInfo object which contains the information of the properties, events and methods of the specified bean class.
  1. If flag==IGNORE_ALL_BEANINFO, the Introspector will ignore all BeanInfo class.
  2. If flag==IGNORE_IMMEDIATE_BEANINFO, the Introspector will ignore the BeanInfo class of the current bean class.
  3. If flag==USE_ALL_BEANINFO, the Introspector will use all BeanInfo class which have been found.

The Introspector will cache the BeanInfo object.

public static  String[]getBeanInfoSearchPath()
     Gets an array of search packages.
public static  voidsetBeanInfoSearchPath(String[] path)
     Sets the search packages.

Field Detail
IGNORE_ALL_BEANINFO
final public static int IGNORE_ALL_BEANINFO(Code)
Constant values to indicate that the Introspector will ignore all BeanInfo class.



IGNORE_IMMEDIATE_BEANINFO
final public static int IGNORE_IMMEDIATE_BEANINFO(Code)
Constant values to indicate that the Introspector will ignore the BeanInfo class of the current bean class.



USE_ALL_BEANINFO
final public static int USE_ALL_BEANINFO(Code)
Constant values to indicate that the Introspector will use all BeanInfo class which have been found. This is the default one.





Method Detail
decapitalize
public static String decapitalize(String name)(Code)
Decapitalizes a given string according to the rule:
  • If the first or only character is Upper Case, it is made Lower Case
  • UNLESS the second character is also Upper Case, when the String is returned unchanged
    Parameters:
      name - -the String to decapitalize the decapitalized version of the String



flushCaches
public static void flushCaches()(Code)
Flushes all BeanInfo caches.



flushFromCaches
public static void flushFromCaches(Class clazz)(Code)
Flushes the BeanInfo caches of the specified bean class
Parameters:
  clazz - the specified bean class



getBeanInfo
public static BeanInfo getBeanInfo(Class beanClass) throws IntrospectionException(Code)
Gets the BeanInfo object which contains the information of the properties, events and methods of the specified bean class.

The Introspector will cache the BeanInfo object. Subsequent calls to this method will be answered with the cached data.


Parameters:
  beanClass - the specified bean class. the BeanInfo of the bean class.
throws:
  IntrospectionException -



getBeanInfo
public static BeanInfo getBeanInfo(Class beanClass, Class stopClass) throws IntrospectionException(Code)
Gets the BeanInfo object which contains the information of the properties, events and methods of the specified bean class. It will not introspect the "stopclass" and its super class.

The Introspector will cache the BeanInfo object. Subsequent calls to this method will be answered with the cached data.


Parameters:
  beanClass - the specified beanClass.
Parameters:
  stopClass - the sopt class which should be super class of the bean class.May be null. the BeanInfo of the bean class.
throws:
  IntrospectionException -



getBeanInfo
public static BeanInfo getBeanInfo(Class beanClass, int flags) throws IntrospectionException(Code)
Gets the BeanInfo object which contains the information of the properties, events and methods of the specified bean class.
  1. If flag==IGNORE_ALL_BEANINFO, the Introspector will ignore all BeanInfo class.
  2. If flag==IGNORE_IMMEDIATE_BEANINFO, the Introspector will ignore the BeanInfo class of the current bean class.
  3. If flag==USE_ALL_BEANINFO, the Introspector will use all BeanInfo class which have been found.

The Introspector will cache the BeanInfo object. Subsequent calls to this method will be answered with the cached data.


Parameters:
  beanClass - the specified bean class.
Parameters:
  flags - the flag to control the usage of the explicitBeanInfo class. the BeanInfo of the bean class.
throws:
  IntrospectionException -



getBeanInfoSearchPath
public static String[] getBeanInfoSearchPath()(Code)
Gets an array of search packages. an array of search packages.



setBeanInfoSearchPath
public static void setBeanInfoSearchPath(String[] path)(Code)
Sets the search packages.
Parameters:
  path - the new search packages to be set.



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.