Subclasses of class Type

The FavaBeans framework includes two pre-defined subclasses of Class org.favabeans.base.TypeType; both are depicted in Figure 3.1.

Class Class org.favabeans.base.JavaTypeJavaType is a simple extension of Class org.favabeans.base.TypeType which describes a single Java class or interface. Accordingly, it is constructed with one Class java.lang.ClassClass argument.

A Class org.favabeans.base.DataSourceTypeDataSourceType 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 Class javax.activation.DataSourceDataSource. 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));