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

📄 jcvm05export.html

📁 JAVA CARD 开发包规格说明,版本为2.2.2
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<P CLASS="TableTextCode"><A NAME="pgfId-1003319"></A>     u2 name_index</P><P CLASS="TableTextCode"><A NAME="pgfId-1003321"></A>     u2 descriptor_index</P><P CLASS="TableTextCode"><A NAME="pgfId-1003323"></A>}</P></TD></TR></TBODY></TABLE><BR></DIV><P CLASS="Paragraph"><A NAME="pgfId-7245"></A>The items of the <KBD CLASS="Filename-Command">method_info</KBD> structure are as follows:</P><P CLASS="Paragraph"><A NAME="pgfId-7246"></A><KBD CLASS="Filename-Command">token</KBD></P><P CLASS="ParaIndent1"><A NAME="pgfId-7247"></A>The <KBD CLASS="Filename-Command">token</KBD> item is the token assigned to this method. If this method is a <KBD CLASS="Filename-Command">static</KBD> method or constructor, the <KBD CLASS="Filename-Command">token</KBD> item represents a <KBD CLASS="Filename-Command">static</KBD> method token (<A HREF="JCVM04naming.html#30947" CLASS="XRef">Section 4.3.7.4, Static Methods and Constructors</A>). If this method is a virtual method, the token item represents a virtual method token (<A HREF="JCVM04naming.html#22193" CLASS="XRef">Section 4.3.7.6, Virtual Methods</A>). If this method is an <KBD CLASS="Filename-Command">interface</KBD> method, the <KBD CLASS="Filename-Command">token</KBD> item represents an <KBD CLASS="Filename-Command">interface</KBD> method token (<A HREF="JCVM04naming.html#17038" CLASS="XRef">Section 4.3.7.7, Interface Methods</A>).</P><P CLASS="Paragraph"><A NAME="pgfId-7251"></A><KBD CLASS="Filename-Command">access_flags</KBD></P><P CLASS="ParaIndent1"><A NAME="pgfId-7252"></A>The value of the <KBD CLASS="Filename-Command">access_flags</KBD> item is a mask of modifiers used with methods. The <KBD CLASS="Filename-Command">access_flags</KBD> modifiers are shown in the following table.</P><BR><TABLE CLASS="Titled" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 DIR="LTR"><CAPTION CLASS="TableCaption"><A NAME="pgfId-998168"> </A> TABLE 5-5 	Export File Method Access and Modifier Flags </CAPTION><THEAD><TR><TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC"><P CLASS="TableHead"><A NAME="pgfId-15413"></A>Name</P></TH><TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC"><P CLASS="TableHead"><A NAME="pgfId-15415"></A>Value</P></TH><TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC"><P CLASS="TableHead"><A NAME="pgfId-15417"></A>Meaning</P></TH><TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC"><P CLASS="TableHead"><A NAME="pgfId-15419"></A>Used By</P></TH></TR></THEAD><TBODY><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15421"></A>ACC_PUBLIC</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15423"></A>0x0001</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15425"></A>Is public; may be accessed from outside its package.</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15427"></A>Any method</P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15429"></A>ACC_PROTECTED</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15431"></A>0x0004</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15433"></A>Is protected; may be accessed within subclasses.</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15435"></A>Class/instance method</P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15437"></A>ACC_STATIC</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15439"></A>0x0008</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15441"></A>Is static.</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15443"></A>Class/instance method</P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15445"></A>ACC_FINAL</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15447"></A>0x0010</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15449"></A>Is final; no further overriding or assignment after initialization.</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15451"></A>Class/instance method</P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15453"></A>ACC_ABSTRACT</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-15455"></A>0x0400</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15457"></A>Is abstract; no implementation is provided</P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-15459"></A>Any method</P></TD></TR></TBODY></TABLE><BR><P CLASS="ParaIndent1"><A NAME="pgfId-7303"></A>Method access and modifier flags are defined in the same way and with the same restrictions as described in <I CLASS="Title">The Java Virtual Machine Specification</I>.</P><P CLASS="ParaIndent1"><A NAME="pgfId-18088"></A>Since all methods represented in an export file are either public or protected, exactly one of the <KBD CLASS="Filename-Command">ACC_PUBLIC</KBD> or <KBD CLASS="Filename-Command">ACC_PROTECTED</KBD> flag must be set.</P><P CLASS="ParaIndent1"><A NAME="pgfId-7304"></A>Unlike in Java class files, the <KBD CLASS="Filename-Command">ACC_NATIVE</KBD> flag is not supported in <KBD CLASS="Filename-Command">export</KBD> files. Whether a method is native is an implementation detail that is not relevant to importing packages. The Java Card virtual machine reserves all other flag values. Their values must be zero.</P><P CLASS="Paragraph"><A NAME="pgfId-7305"></A><KBD CLASS="Filename-Command">name_index</KBD></P><P CLASS="ParaIndent1"><A NAME="pgfId-7306"></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_Utf8_info</KBD> (<A HREF="JCVM05export.html#53940" CLASS="XRef">Section 5.6.4, CONSTANT_Utf8</A>) structure representing either the special internal method name for constructors, <KBD CLASS="Filename-Command">&lt;init&gt;</KBD>, or a valid Java method name stored as a simple (not fully qualified) name.</P><P CLASS="Paragraph"><A NAME="pgfId-7307"></A><KBD CLASS="Filename-Command">descriptor_index</KBD></P><P CLASS="ParaIndent1"><A NAME="pgfId-7308"></A>The value of the <KBD CLASS="Filename-Command">descriptor_index</KBD> item must be a valid index into the <KBD CLASS="Filename-Command">constant_pool</KBD> table. The constant_pool entry at that index must be a <KBD CLASS="Filename-Command">CONSTANT_Utf8_info</KBD> (<A HREF="JCVM05export.html#53940" CLASS="XRef">Section 5.6.4, CONSTANT_Utf8</A>) structure representing a valid Java method descriptor.</P><P CLASS="ParaIndent1"><A NAME="pgfId-7309"></A>Representation of a method descriptor in an <KBD CLASS="Filename-Command">export</KBD> file is the same as in a Java <KBD CLASS="Filename-Command">class</KBD> file. See the specification described in <I CLASS="Title">The Java Virtual Machine Specification</I> (<A HREF="JCVM04naming.html#12405" CLASS="XRef">Section 4.3.3, The Export File and Conversion</A>).</P><P CLASS="ParaIndent1"><A NAME="pgfId-17917"></A>All classes referenced in a descriptor must be public classes.</P><H2 CLASS="Head1"><A NAME="pgfId-7310"></A><DIV><HR ALIGN=left SIZE=6 WIDTH=15% noshade></DIV>5.10	<A NAME="marker-20714"></A>Attributes</H2><P CLASS="Paragraph"><A NAME="pgfId-7311"></A>Attributes are used in the <KBD CLASS="Filename-Command">field_info</KBD> (<A HREF="JCVM05export.html#14672" CLASS="XRef">Section 5.8, Fields</A>) structure of the <KBD CLASS="Filename-Command">export</KBD> file format. All attributes have the following general format:</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-1003402"></A>attribute_info {</P><P CLASS="TableTextCode"><A NAME="pgfId-1003404"></A>     u2 attribute_name_index</P><P CLASS="TableTextCode"><A NAME="pgfId-1003406"></A>     u4 attribute_length</P><P CLASS="TableTextCode"><A NAME="pgfId-1003408"></A>     u1 info[attribute_length]</P><P CLASS="TableTextCode"><A NAME="pgfId-1003410"></A>}</P></TD></TR></TBODY></TABLE><BR></DIV><H3 CLASS="Head2"><A NAME="pgfId-7317"></A>5.10.1	<A NAME="82094"></A>ConstantValue <A NAME="marker-20715"></A>Attribute</H3><P CLASS="Paragraph"><A NAME="pgfId-11266"></A>The <KBD CLASS="Filename-Command">ConstantValue</KBD> attribute is a fixed-length attribute used in the attributes table of the <KBD CLASS="Filename-Command">field_info</KBD> structures. A <KBD CLASS="Filename-Command">ConstantValue</KBD> attribute represents the value of a final static field (compile-time constant); that is, both the <KBD CLASS="Filename-Command">ACC_STATIC</KBD> and <KBD CLASS="Filename-Command">ACC_FINAL</KBD> bits in the flags item of the <KBD CLASS="Filename-Command">field_info</KBD> structure must be set. There can be no more than one <KBD CLASS="Filename-Command">ConstantValue</KBD> attribute in the attributes table of a given <KBD CLASS="Filename-Command">field_info</KBD> structure.</P><P CLASS="Paragraph"><A NAME="pgfId-11268"></A>The <KBD CLASS="Filename-Command">ConstantValue</KBD> attribute has the format:</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-1003469"></A>ConstantValue_attribute {</P><P CLASS="TableTextCode"><A NAME="pgfId-1003471"></A>     u2 attribute_name_index</P><P CLASS="TableTextCode"><A NAME="pgfId-1003473"></A>     u4 attribute_length</P><P CLASS="TableTextCode"><A NAME="pgfId-1003475"></A>     u2 constantvalue_index</P><P CLASS="TableTextCode"><A NAME="pgfId-1003477"></A>}</P></TD></TR></TBODY></TABLE><BR></DIV><P CLASS="Paragraph"><A NAME="pgfId-15484"></A>The items of the <KBD CLASS="Filename-Command">ConstantValue_attribute</KBD> structure are as follows:</P><P CLASS="Paragraph"><A NAME="pgfId-7328"></A><KBD CLASS="Filename-Command">attribute_name_index</KBD></P><P CLASS="ParaIndent1"><A NAME="pgfId-7329"></A>The value of the <KBD CLASS="Filename-Command">attribute_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_Utf8_info</KBD> (<A HREF="JCVM05export.html#53940" CLASS="XRef">Section 5.6.4, CONSTANT_Utf8</A>) structure representing the string &quot;<KBD CLASS="Filename-Command">ConstantValue</KBD>.&quot;</P><P CLASS="Paragraph"><A NAME="pgfId-7330"></A><KBD CLASS="Filename-Command">attribute_length</KBD></P><P CLASS="ParaIndent1"><A NAME="pgfId-7331"></A>The value of the <KBD CLASS="Filename-Command">attribute_length</KBD> item of a <KBD CLASS="Filename-Command">ConstantValue_attribut

⌨️ 快捷键说明

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