===== 6.1 Component Model ===== A Java Card CAP file consists of a set of **components**. Each component describes a set of elements in the Java package defined, or an aspect of the CAP file. A complete CAP file must contain all of the required **components** specified in this chapter. Three **components** are optional: the Applet Component ([[6.5_Applet Component| Section 6.5, Applet Component]]), Export Component ([[6.12_Export Component| Section 6.12, Export Component]]), and Debug Component ([[6.14_Debug Component| Section 6.14, Debug Component]]). The Applet Component is included only if one or more Applets are defined in the package. The Export Component is included only if classes in other packages may import elements in the package defined. The Debug Component contains all of the data necessary for debugging a package. The content of each component defined in a CAP file must conform to the corresponding format specified in this chapter. All components have the following general format: Each component begins with a 1-byte tag indicating the kind of component. Valid tags and their values are listed in [[6._The_CAP_File_Format| TABLE 6-1]]. The size item indicates the number of bytes in the info array of the component, not including the tag and size items. The content and format of the info array varies with the type of component. Component Type Value COMPONENT_Header 1 COMPONENT_Directory 2 COMPONENT_Applet 3 COMPONENT_Import 4 COMPONENT_ConstantPool 5 COMPONENT_Class 6 COMPONENT_Method 7 COMPONENT_StaticField 8 COMPONENT_ReferenceLocation 9 COMPONENT_Export 10 COMPONENT_Descriptor 11 COMPONENT_Debug 12 Sun Microsystems, Inc. may define additional components in future versions of this Java Card virtual machine specification. It is guaranteed that additional components will have **tag** values between 13 and 127, inclusive.