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

📄 jcvm02lang.html

📁 JAVA CARD 开发包规格说明,版本为2.2.2
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<P CLASS="Paragraph"><A NAME="pgfId-46987"></A>Primitive constant data types include <KBD CLASS="Filename-Command">boolean</KBD>, <KBD CLASS="Filename-Command">byte</KBD>, <KBD CLASS="Filename-Command">short</KBD>, and <KBD CLASS="Filename-Command">int</KBD>.</P><P CLASS="Paragraph"><A NAME="pgfId-43955"></A>Given Java technology source files that adhere to these language-level constraints on static field initialization, it is expected that reasonable Java compilers will:</P><UL><LI CLASS="Bullet1"><A NAME="pgfId-46703"></A>Inline constants in the bytecodes that reference static final primitive fields that are initialized in the declaration statement.</LI><P CLASS="Linebreak"></P><LI CLASS="Bullet1"><A NAME="pgfId-46705"></A>Produce only the following bytecodes:</LI><P CLASS="Linebreak"></P><UL><LI CLASS="Bullet2"><A NAME="pgfId-43956"></A>load a value on the stack: <KBD CLASS="Filename-Command">iconst_[m1,0-5]</KBD>, <KBD CLASS="Filename-Command">[b|s]ipush, ldc, ldc_w, aconst_null</KBD></LI><P CLASS="Linebreak"></P><LI CLASS="Bullet2"><A NAME="pgfId-43957"></A>create an array: <KBD CLASS="Filename-Command">newarray([byte|short|boolean|int]</KBD> )</LI><P CLASS="Linebreak"></P><LI CLASS="Bullet2"><A NAME="pgfId-43958"></A>duplicate items on the stack: <KBD CLASS="Filename-Command">dup</KBD></LI><P CLASS="Linebreak"></P><LI CLASS="Bullet2"><A NAME="pgfId-44057"></A>store values in arrays or static fields: <KBD CLASS="Filename-Command">[b|i|s]astore, putstatic</KBD></LI><P CLASS="Linebreak"></P><LI CLASS="Bullet2"><A NAME="pgfId-44065"></A>return from method: <KBD CLASS="Filename-Command">return</KBD></LI><P CLASS="Linebreak"></P></UL></UL><H3 CLASS="Head2"><A NAME="pgfId-44202"></A>2.2.5	<A NAME="marker-47430"></A>Multiselectable Applets Restrictions</H3><P CLASS="Paragraph"><A NAME="pgfId-44210"></A>Applets that implement the <KBD CLASS="Filename-Command">javacard.framework.Multiselectable</KBD> interface are called multiselectable applets. For more details on multiselection, please see the <I CLASS="Title"></I><EM CLASS="Emphasis">Runtime Environment Specification, Java Card Platform, Version 2.2.2</EM><I CLASS="Title"></I>.</P><P CLASS="Paragraph"><A NAME="pgfId-44220"></A>All applets within a package shall be multiselectable, or none shall be.</P><H3 CLASS="Head2"><A NAME="pgfId-44232"></A>2.2.6	<A NAME="marker-47431"></A>Java Card Platform Remote Method Invocation<A NAME="marker-47432"></A> (<A NAME="marker-47433"></A>RMI) Restrictions</H3><P CLASS="Paragraph"><A NAME="pgfId-44233"></A>This section defines the subset of the RMI system that is supported by Java Card platform RMI (&quot;Java Card RMI&quot;). </P><H4 CLASS="Head3"><A NAME="pgfId-44234"></A>2.2.6.1	<A NAME="18736"></A>Remote <A NAME="marker-47434"></A>Classes and Remote Interfaces</H4><P CLASS="Paragraph"><A NAME="pgfId-46393"></A>A class is remote if it or any of its superclasses implements a remote interface. </P><P CLASS="Paragraph"><A NAME="pgfId-46489"></A>A remote interface is an interface which satisfies the following requirements:</P><UL><LI CLASS="Bullet1"><A NAME="pgfId-46490"></A>The interface name is <KBD CLASS="Filename-Command">java.rmi.Remote</KBD> or the interface extends, directly or indirectly, the interface <KBD CLASS="Filename-Command">java.rmi.Remote</KBD>. </LI><P CLASS="Linebreak"></P><LI CLASS="Bullet1"><A NAME="pgfId-46493"></A>Each method declaration in the remote interface or its super-interfaces includes the exception <KBD CLASS="Filename-Command">java.rmi.RemoteException</KBD> (or one of its superclasses) in its <KBD CLASS="Filename-Command">throws</KBD> clause.</LI><P CLASS="Linebreak"></P><LI CLASS="Bullet1"><A NAME="pgfId-46539"></A>In a remote method declaration, if a remote object is declared as a return type, it is declared as the remote interface, not the implementation class of that interface.</LI><P CLASS="Linebreak"></P></UL><P CLASS="Paragraph"><A NAME="pgfId-46394"></A>In addition, Java Card RMI imposes additional constraints on the definition of remote methods. These constraints are as a result of the Java Card platform language subset and other feature limitations. For more information, see <A HREF="JCVM02lang.html#26167" CLASS="XRef">Section 2.2.6.2, Access Control of Remote Interfaces</A> and <A HREF="JCVM02lang.html#91413" CLASS="XRef">Section 2.2.6.3, Parameters and Return Values</A>.</P><H4 CLASS="Head3"><A NAME="pgfId-44265"></A>2.2.6.2	<A NAME="marker-47435"></A><A NAME="26167"></A>Access Control of Remote Interfaces</H4><P CLASS="Paragraph"><A NAME="pgfId-44275"></A>The Java RMI system supports the package access control defined in the Java language. However, Java Card RMI does not support package-visible remote interfaces.</P><H4 CLASS="Head3"><A NAME="pgfId-44237"></A>2.2.6.3	<A NAME="marker-47436"></A><A NAME="91413"></A>Parameters and Return Values</H4><P CLASS="Paragraph"><A NAME="pgfId-44238"></A>The parameters of a remote method must only include parameters of the following types:</P><UL><LI CLASS="Bullet1"><A NAME="pgfId-44239"></A>any primitive type supported by Java Card technology (<KBD CLASS="Filename-Command">boolean,</KBD> <KBD CLASS="Filename-Command">byte,</KBD> <KBD CLASS="Filename-Command">short, int</KBD>),</LI><P CLASS="Linebreak"></P><LI CLASS="Bullet1"><A NAME="pgfId-44240"></A>any single-dimension array type of an primitive type supported by Java Card technology (<KBD CLASS="Filename-Command">boolean[],</KBD> <KBD CLASS="Filename-Command">byte[],</KBD> <KBD CLASS="Filename-Command">short[],</KBD> <KBD CLASS="Filename-Command">int[]</KBD>).</LI><P CLASS="Linebreak"></P></UL><P CLASS="Paragraph"><A NAME="pgfId-44241"></A>The return type of a remote method must only be one of the following types:</P><UL><LI CLASS="Bullet1"><A NAME="pgfId-44242"></A>any primitive type supported by Java Card technology (<KBD CLASS="Filename-Command">boolean,</KBD> <KBD CLASS="Filename-Command">byte,</KBD> <KBD CLASS="Filename-Command">short,</KBD> <KBD CLASS="Filename-Command">int</KBD>),</LI><P CLASS="Linebreak"></P><LI CLASS="Bullet1"><A NAME="pgfId-44243"></A>any single-dimension array type of an primitive type supported by Java Card technology (<KBD CLASS="Filename-Command">boolean[],</KBD> <KBD CLASS="Filename-Command">byte[],</KBD> <KBD CLASS="Filename-Command">short[],</KBD> <KBD CLASS="Filename-Command">int[]</KBD>),</LI><P CLASS="Linebreak"></P><LI CLASS="Bullet1"><A NAME="pgfId-44244"></A>any remote interface type</LI><P CLASS="Linebreak"></P><LI CLASS="Bullet1"><A NAME="pgfId-46420"></A>type <KBD CLASS="Filename-Command">void</KBD></LI><P CLASS="Linebreak"></P></UL><H2 CLASS="Head1"><A NAME="pgfId-36019"></A><DIV><HR ALIGN=left SIZE=6 WIDTH=15% noshade></DIV>2.3	<A NAME="marker-47437"></A>Java Card VM Subset</H2><P CLASS="Paragraph"><A NAME="pgfId-36020"></A>Java Card technology uses a subset of the Java virtual machine, and familiarity with the Java platform is required to understand the Java Card virtual machine. </P><P CLASS="Paragraph"><A NAME="pgfId-36021"></A>The items discussed in this section are not described to the level of a virtual machine specification. For complete documentation on the Java virtual machine, refer to the <I CLASS="Title">The Java Virtual Machine Specification</I>.</P><H3 CLASS="Head2"><A NAME="pgfId-36023"></A>2.3.1	<A NAME="marker-47438"></A>class File Subset</H3><P CLASS="Paragraph"><A NAME="pgfId-36024"></A>The operation of the Java Card virtual machine can be defined in terms of standard Java platform class files. Since the Java Card virtual machine supports only a subset of the behavior of the Java virtual machine, it also supports only a subset of the standard class file format.</P><H4 CLASS="Head3"><A NAME="pgfId-36025"></A>2.3.1.1	Not Supported in Class Files</H4><H5 CLASS="Head4"><A NAME="pgfId-51948"></A><A NAME="marker-51947"></A>Class access flags</H5><H5 CLASS="Head4"><A NAME="pgfId-36026"></A>In <KBD CLASS="Filename-Command">class_info</KBD> and <KBD CLASS="Filename-Command">interface_info</KBD> structures, the access flag <KBD CLASS="Filename-Command">ACC_ENUM</KBD> is not supported.</H5><H5 CLASS="Head4"><A NAME="pgfId-51945"></A><A NAME="marker-47439"></A>Field Descriptors</H5><P CLASS="Paragraph"><A NAME="pgfId-36027"></A>Field descriptors may not contain <KBD CLASS="Filename-Command">BaseType</KBD> characters <KBD CLASS="Filename-Command">C</KBD>, <KBD CLASS="Filename-Command">D</KBD>, <KBD CLASS="Filename-Command">F</KBD> or <KBD CLASS="Filename-Command">J</KBD>. <KBD CLASS="Filename-Command">ArrayType</KBD> descriptors for arrays of more than one dimension may not be used.</P><H5 CLASS="Head4"><A NAME="pgfId-36028"></A><A NAME="marker-47440"></A>Constant Pool</H5><P CLASS="Paragraph"><A NAME="pgfId-49127"></A>Constant pool table entries with the following <KBD CLASS="Filename-Command">tag</KBD> values are not supported.</P><BR><TABLE CLASS="Titled" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 DIR="LTR"><CAPTION CLASS="TableCaption"><A NAME="pgfId-49104"> </A> TABLE 2-3 	Unsupported Java Constant Pool Tags </CAPTION><THEAD><TR><TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC"><P CLASS="TableHead"><A NAME="pgfId-49108"></A>Constant Type</P></TH><TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC"><P CLASS="TableHead"><A NAME="pgfId-49110"></A>Value</P></TH></TR></THEAD><TBODY><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-49112"></A><KBD CLASS="Filename-Command">CONSTANT_String</KBD></P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-49114"></A><KBD CLASS="Filename-Command">8</KBD></P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-49116"></A><KBD CLASS="Filename-Command">CONSTANT_Float</KBD></P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-49118"></A><KBD CLASS="Filename-Command">4</KBD></P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-49120"></A><KBD CLASS="Filename-Command">CONSTANT_Long</KBD></P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-49122"></A><KBD CLASS="Filename-Command">5</KBD></P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-49124"></A><KBD CLASS="Filename-Command">CONSTANT_Double</KBD></P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-49126"></A><KBD CLASS="Filename-Command">6</KBD></P></TD></TR></TBODY></TABLE><BR><H5 CLASS="Head4"><A NAME="pgfId-49130"></A><A NAME="marker-49129"></A>Fields</H5><P CLASS="Paragraph"><A NAME="pgfId-36054"></A>In <KBD CLASS="Filename-Command">field_info</KBD> structures, the access flags <KBD CLASS="Filename-Command">ACC_VOLATILE</KBD>, <KBD CLASS="Filename-Command">ACC_TRANSIENT</KBD> and <KBD CLASS="Filename-Command">ACC_ENUM</KBD> are not supported.</P><H5 CLASS="Head4"><A NAME="pgfId-36055"></A><A NAME="marker-47442"></A>Methods</H5><P CLASS="Paragraph"><A NAME="pgfId-36056"></A>In <KBD CLASS="Filename-Command">method_info</KBD> structures, the access flags <KBD CLASS="Filename-Command">ACC_SYNCHRONIZED</KBD>, <KBD CLASS="Filename-Command">ACC_STRICT</KBD>, <KBD CLASS="Filename-Command">ACC_NATIVE</KBD>, and <KBD CLASS="Filename-Command">ACC_VARARGS</KBD> are not supported.</P><H4 CLASS="Head3"><A NAME="pgfId-36057"></A>2.3.1.2	Supported in Class Files</H4><H5 CLASS="Head4"><A NAME="pgfId-36058"></A><A NAME="marker-47443"></A>ClassFile</H5><P CLASS="Paragraph"><A NAME="pgfId-36059"></A>All items in the <KBD CLASS="Filename-Command">ClassFile</KBD> structure are supported.</P><H5 CLASS="Head4"><A NAME="pgfId-36060"></A><A NAME="marker-47444"></A>Field Descriptors</H5><P CLASS="Paragraph"><A NAME="pgfId-36061"></A>Field descriptors may contain BaseType characters <KBD CLASS="Filename-Command">B</KBD>, <KBD CLASS="Filename-Command">I</KBD>, <KBD CLASS="Filename-Command">S</KBD> and <KBD CLASS="Filename-Command">Z</KBD>, as well as any <KBD CLASS="Filename-Command">ObjectType</KBD>. <KBD CLASS="Filename-Command">ArrayType</KBD> descriptors for arrays of a single dimension may also be used.</P><H5 CLASS="Head4"><A NAME="pgfId-36062"></A><A NAME="marker-47445"></A>Method Descriptors</H5><P CLASS="Paragraph"><A NAME="pgfId-36063"></A>All forms of method descriptors are supported.</P><H5 CLASS="Head4"><A NAME="pgfId-36064"></A><A NAME="marker-47446"></A>Constant pool </H5><P CLASS="Paragraph"><A NAME="pgfId-36065"></A>Constant pool table entry with the following tag values are supported.</P><BR><TABLE CLASS="Titled" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 DIR="LTR"><CAPTION CLASS="TableCaption"><A NAME="pgfId-49140"> </A> TABLE 2-4 	Supported Java Constant Pool Tags </CAPTION><THEAD><TR><TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC"><P CLASS="TableHead"><A NAME="pgfId-43570"></A>Constant Type</P></TH><TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC"><P CLASS="TableHead"><A NAME="pgfId-43572"></A>Value</P></TH></TR></THEAD><TBODY><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-43574"></A><KBD CLASS="Filename-Command">CONSTANT_Class</KBD></P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-43576"></A><KBD CLASS="Filename-Command">7</KBD></P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-43578"></A><KBD CLASS="Filename-Command">CONSTANT_Fieldref</KBD></P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-43580"></A><KBD CLASS="Filename-Command">9</KBD></P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableTextCode"><A NAME="pgfId-43582"></A><KBD CLASS="Filename-Command">CONSTANT_Methodref</KBD>

⌨️ 快捷键说明

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