25.1. Standard ValuesWhen it interprets a table, a Fit fixture checks the types of the instance variables and methods involved, using reflection. For example, for each label in a header row, ColumnFixture checks in the fixture object for the corresponding variable or method. For each public instance variable, method parameter, and method return value that's used in a table, Fit creates an appropriately typed TypeAdapter object. For a public instance variable, a TypeAdapter is first passed an object from which it accesses the appropriate public instance variable; that object is a fixture object for ColumnFixture and any object, in an array, for RowFixture. A TypeAdapter object is able to
Fit has TypeAdapters for all the primitive Java types and their corresponding wrapper classes, such as class Double for a double, so that these can all be used as values in tables. There are also TypeAdapters for the classes String, Date, and ScientificDouble[1] and for arrays of any of these classes or of the primitive types. An array value is a comma-separated list of values, such as 1, 2, 3, as shown in Section 3.4 on p. 19.
That's all we need to know about TypeAdapters for this chapter. Some of the other functionality of TypeAdapter is covered in Section 37.6 on p. 311. |