===== 6.8 Class Component ===== The Class Component describes each of the classes and interfaces defined in this package. It does not contain complete access information and content details for each class and interface. Instead, the information included is limited to that required to execute operations associated with a particular class or interface, without performing verification. Complete details regarding the classes and interfaces defined in this package are included in the Descriptor Component ([[6.13_Descriptor Component| Section 6.13, Descriptor Component]]). The information included in the Class Component for each interface is sufficient to uniquely identify the interface and to test whether or not a cast to that interface is valid. The information included in the Class Component for each class is sufficient to resolve operations associated with instances of a class. The operations include creating an instance, testing whether or not a cast of the instance is valid, dispatching virtual method invocations, and dispatching interface method invocations. Also included is sufficient information to locate instance fields of type **reference**, including arrays. The classes represented in the Class Component reference other entries in the Class Component in the form of superclass, superinterface and implemented interface references. When a superclass, superinterface or implemented interface is defined in an imported package the Import Component is used in the representation of the reference. The classes represented in the Class Component also contain references to virtual methods defined in the Method Component ([[6.9_Method Component| Section 6.9, Method Component]]) of this CAP file. References to virtual methods defined in imported packages are not explicitly described. Instead such methods are located through a superclass within the hierarchy of the class, where the superclass is defined in the same imported package as the virtual method. The Constant Pool Component ([[6.7_Constant Pool Component| Section 6.7, Constant Pool Component]]), Export Component ([[6.12_Export Component| Section 6.12, Export Component]]), Descriptor Component ([[6.13_Descriptor Component| Section 6.13, Descriptor Component]]) and Debug Component ([[6.14_Debug Component| Section 6.14, Debug Component]]) reference classes and interfaces defined in the Class Component. No other CAP file components reference the Class Component. The Class Component is represented by the following structure: The items in the **class_component** structure are as follows: **tag** The tag item has the value **COMPONENT_Class** (6). **size** The ******size****** item indicates the number of bytes in the **class_component** structure, excluding the **tag** and ******size****** items. The value of the ******size****** item must be greater than zero. **signature_pool_length** The ****signature_pool_length**** item indicates the number of bytes in the **signature_pool[]** item. The value of the ****signature_pool_length**** item must be zero if the package does not define any remote interfaces or remote classes. **signature_pool[]** The **signature_pool[]** item represents a list of variable-length **type_descriptor** structures. These descriptors represent the signatures of the remote methods. **interfaces[]** The **interfaces** item represents an array of **interface_info** structures. Each interface defined in this package is represented in the array. The entries are ordered based on hierarchy such that a superinterface has a lower index than any of its sub**interfaces**. **classes[]** The **classes** item represents a table of variable-length **class_info** structures. Each class defined in this package is represented in the array. The entries are ordered based on hierarchy such that a superclass has a lower index than any of its sub**classes**.