The FavaBeans framework includes two pre-defined subclasses of
Type; both are depicted in Figure 3.1.
Class JavaType is a simple
extension of
Type which describes
a single Java class or interface. Accordingly, it is constructed with
one
Class argument.
A DataSourceType represents
a type of MIME-typed data stream. It is a bridge to
the type system defined by the Java Activation Framework
(JAF), and especially to class
DataSource. As such, given:
String mimetype = "text/html"; // for example . . . Type[] supers = new DataSourceType(mimeType).getSupertypes();
the following is always true:
(supers.length == 1) && supers[0].equals(new JavaType(javax.activation.DataSource));