To use JEM, you need to have a project
that is a Java project. It does introspection on a per Java project basis.
Note: The BeanInfo classes still are
marked internal, but that is because they haven't been made API yet. They
are stable and not likely to change very much except to be renamed to API
classes sometime in the future.
To use:
... To setup for a project do
this once per session to initialize the BeanInfo process:
From the jclass you can accessors to
get the information you need. For example jclass.getAllProperties() returns
all of the EStructuralFeatures that are BeanInfo properties.
There are two ways to access the actual
BeanInfo such as PropertyDecorator (which corresponds to java.beans.PropertyDescriptor).
The first is to get it from the EStructuralFeature. In that case you would
do (Utilities is org.eclipse.jem.internal.beaninfo.core.Utilities):
and then use the iterator. It will return
PropertyDecorator's from the iterator.
On JavaRefFactory there are various
types of "reflectType" methods. You can choose which fits for
you. The same goes for the Utilities. There are various methods that do
different things to help you out.