⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jcvm05export.html

📁 JAVA CARD 开发包规格说明,版本为2.2.2
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<DIV><HR ALIGN=left SIZE=6 WIDTH=15% noshade></DIV>5.7	<A NAME="31663"></A>Classes<A NAME="marker-20710"></A> and <A NAME="marker-20711"></A>Interfaces</H2><P CLASS="Paragraph"><A NAME="pgfId-7090"></A>Each class and interface is described by a variable-length <KBD CLASS="Filename-Command">class_info</KBD> structure. The format of this structure is:</P><DIV CLASS="Code"><BR><TABLE CLASS="Code" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 DIR="LTR"><TBODY><TR><TD SCOPE="ROW"><P CLASS="TableTextCode"><A NAME="pgfId-1002974"></A>class_info {</P><P CLASS="TableTextCode"><A NAME="pgfId-1002976"></A>     u1 token</P><P CLASS="TableTextCode"><A NAME="pgfId-1002978"></A>     u2 access_flags</P><P CLASS="TableTextCode"><A NAME="pgfId-1002980"></A>     u2 name_index</P><P CLASS="TableTextCode"><A NAME="pgfId-1002982"></A>     u2 export_supers_count</P><P CLASS="TableTextCode"><A NAME="pgfId-1002984"></A>     u2 supers[export_supers_count]</P><P CLASS="TableTextCode"><A NAME="pgfId-1002986"></A>     u1 export_interfaces_count</P><P CLASS="TableTextCode"><A NAME="pgfId-1002988"></A>     u2 interfaces[export_interfaces_count]</P><P CLASS="TableTextCode"><A NAME="pgfId-1002990"></A>     u2 export_fields_count</P><P CLASS="TableTextCode"><A NAME="pgfId-1002992"></A>     field_info fields[export_fields_count]</P><P CLASS="TableTextCode"><A NAME="pgfId-1002994"></A>     u2 export_methods_count</P><P CLASS="TableTextCode"><A NAME="pgfId-1002996"></A>     method_info methods[export_methods_count]</P><P CLASS="TableTextCode"><A NAME="pgfId-1002998"></A>}</P></TD></TR></TBODY></TABLE><BR></DIV><P CLASS="Paragraph"><A NAME="pgfId-7102"></A>The items of the <KBD CLASS="Filename-Command">class_info</KBD> structure are as follows:</P><P CLASS="Paragraph"><A NAME="pgfId-7103"></A><KBD CLASS="Filename-Command">token</KBD></P><P CLASS="ParaIndent1"><A NAME="pgfId-11361"></A>The value of the token item is the class token (<A HREF="JCVM04naming.html#14497" CLASS="XRef">Section 4.3.7.2, Classes and Interfaces</A>) assigned to this class or interface.</P><P CLASS="Paragraph"><A NAME="pgfId-11363"></A><KBD CLASS="Filename-Command">access_flags</KBD></P><P CLASS="ParaIndent1"><A NAME="pgfId-7106"></A>The value of the <KBD CLASS="Filename-Command">access_flags</KBD> item is a mask of modifiers used with class and interface declarations. The <KBD CLASS="Filename-Command">access_flags</KBD> modifiers are shown in the following table<STRONG>.</STRONG></P><BR><TABLE CLASS="Titled" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 DIR="LTR"><CAPTION CLASS="TableCaption"><A NAME="pgfId-997881"> </A> TABLE 5-3 	Export File Class Access and Modifier Flags </CAPTION><THEAD><TR><TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC"><P CLASS="TableHead"><A NAME="pgfId-15343"></A>Name</P></TH><TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC"><P CLASS="TableHead"><A NAME="pgfId-15345"></A>Value</P></TH><TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC"><P CLASS="TableHead"><A NAME="pgfId-15347"></A>Meaning</P></TH><TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC"><P CLASS="TableHead"><A NAME="pgfId-15349"></A>Used By</P></TH></TR></THEAD><TBODY><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15351"></A>ACC_PUBLIC</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15353"></A>0x0001</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15355"></A>Is public; may be accessed from outside its package</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15357"></A>Class, interface</P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15359"></A>ACC_FINAL</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15361"></A>0x0010</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15363"></A>Is final; no subclasses allowed.</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15365"></A>Class</P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15367"></A>ACC_INTERFACE</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15369"></A>0x0200</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15371"></A>Is an interface</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15373"></A>Interface</P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15375"></A>ACC_ABSTRACT</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15377"></A>0x0400</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15379"></A>Is abstract; may not be instantiated</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15381"></A>Class, interface</P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15383"></A>ACC_SHAREABLE</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15385"></A>0x0800</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15387"></A>Is shareable; may be shared between Java Card applets.</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15389"></A>Class, interface</P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-18255"></A>ACC_REMOTE</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-18257"></A>0x1000</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-18259"></A>Is remote; may be accessed by Java Card RMI</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-18261"></A>Class,</P><P CLASS="TableText"><A NAME="pgfId-18268"></A>interface</P></TD></TR></TBODY></TABLE><BR><P CLASS="ParaIndent1"><A NAME="pgfId-20311"></A>The <KBD CLASS="Filename-Command">ACC_SHAREABLE</KBD> flag indicates whether this class or interface is shareable.<A NAME="fnote3"></A><A HREF="#pgfId-20307"  CLASS="footnote"><SUP>[3]</SUP></A> A class is shareable if it implements (directly or indirectly) the<BR><KBD CLASS="Filename-Command">javacard.framework.Shareable</KBD> interface. An interface is shareable if it is or extends (directly or indirectly) the <KBD CLASS="Filename-Command">javacard.framework.Shareable</KBD> interface.</P><P CLASS="ParaIndent1"><A NAME="pgfId-20312"></A>The <KBD CLASS="Filename-Command">ACC_REMOTE</KBD> flag indicates whether this class or interface is remote. The value of this flag must be one if and only if the class or interface satisfies the requirements defined in <A HREF="JCVM02lang.html#18736" CLASS="XRef">Section 2.2.6.1, Remote Classes and Remote Interfaces</A>.</P><P CLASS="ParaIndent1"><A NAME="pgfId-18063"></A>All other class access and modifier flags are defined in the same way and with the same restrictions as described in <I CLASS="Title">The </I><EM CLASS="Emphasis">Java Virtual Machine Specification</EM><I CLASS="Title"></I>.</P><P CLASS="ParaIndent1"><A NAME="pgfId-18079"></A>Since all classes and interfaces represented in an export file are public, the <KBD CLASS="Filename-Command">ACC_PUBLIC</KBD> flag must always be set.</P><P CLASS="ParaIndent1"><A NAME="pgfId-18074"></A>All other flag values are reserved. Their values must be zero.</P><P CLASS="Paragraph"><A NAME="pgfId-7150"></A><KBD CLASS="Filename-Command">name_index</KBD></P><P CLASS="ParaIndent1"><A NAME="pgfId-999368"></A>The value of the <KBD CLASS="Filename-Command">name_index</KBD> item must be a valid index into the <KBD CLASS="Filename-Command">constant_pool</KBD> table. The <KBD CLASS="Filename-Command">constant_pool</KBD> entry at that index must be a <KBD CLASS="Filename-Command">CONSTANT_Classref_info</KBD> (<A HREF="JCVM05export.html#22612" CLASS="XRef">Section 5.6.2, CONSTANT_Classref</A>) structure representing a valid, fully qualified Java class or interface name.</P><P CLASS="Paragraph"><A NAME="pgfId-999234"></A><KBD CLASS="Filename-Command">export_supers_count</KBD></P><P CLASS="ParaIndent1"><A NAME="pgfId-999235"></A>The value of the <KBD CLASS="Filename-Command">export_supers_count</KBD> item indicates the number of entries in the <Alt CLASS="InlineAltText">supers</Alt> array.</P><P CLASS="Paragraph"><A NAME="pgfId-999325"></A><KBD CLASS="Filename-Command">supers[]</KBD></P><P CLASS="ParaIndent1"><A NAME="pgfId-999348"></A>The <KBD CLASS="Filename-Command">supers</KBD> array contains an entry for each public superclass of this class or interface. It does not include package visible superclasses. </P><P CLASS="ParaIndent1"><A NAME="pgfId-999349"></A>For a class, each value in the <KBD CLASS="Filename-Command">supers</KBD> array must be a valid index into the <KBD CLASS="Filename-Command">constant_pool</KBD> table. The <KBD CLASS="Filename-Command">constant_pool</KBD> entry at each value must be a <KBD CLASS="Filename-Command">CONSTANT_Classref_info</KBD> structure (<A HREF="JCVM05export.html#22612" CLASS="XRef">Section 5.6.2, CONSTANT_Classref</A>) representing a valid, fully-qualified Java class name. Entries in the supers array can occur in any order. </P><P CLASS="ParaIndent1"><A NAME="pgfId-999338"></A>For an interface, the supers array contains a single value representing a valid index into the <KBD CLASS="Filename-Command">constant_pool</KBD> table. The <Alt CLASS="InlineAltText">constant_pool</Alt> entry must be a <KBD CLASS="Filename-Command">CONSTANT_Classref_info</KBD> structure (<A HREF="JCVM05export.html#22612" CLASS="XRef">Section 5.6.2, CONSTANT_Classref</A>) representing the fully-qualified name of the <KBD CLASS="Filename-Command">java.lang.Object</KBD> class.</P><P CLASS="Paragraph"><A NAME="pgfId-999331"></A><KBD CLASS="Filename-Command">export_interfaces_count</KBD></P><P CLASS="ParaIndent1"><A NAME="pgfId-7156"></A>The value of the <KBD CLASS="Filename-Command">export_interfaces_count</KBD> item indicates the number of entries in the <KBD CLASS="Filename-Command">interfaces</KBD> array.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -