May 2001
Intermediate to advanced
1088 pages
30h 13m
English
You use Introspection in an application in basically the same places you use Reflection. You typically use Introspection in utility classes that map Java objects onto some other medium (database, XML, network) and in graphical user interfaces.
The JOX library that you saw in Chapter 24, "Using Java-XML Tools," uses Introspection to map Java objects to XML and map XML to Java objects. In fact, the reason that JOX works with JavaBeans instead of any Java object is that JOX uses Reflection.
Introspection makes a lot of sense for GUI applications in which you create an automated tool to copy data between data objects and graphics components. You will see several examples of this technique in the next chapter. ...
Read now
Unlock full access