📄 jcvm04naming.html
字号:
<td scope="row" rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998317"></a>Instance Field </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998319"></a>0 - 255 </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998321"></a>Public or Private </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998323"></a>Class </p> </td> </tr> <tr> <td scope="row" rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998325"></a>Virtual Method </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998327"></a>0 - 127 </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998329"></a>Public or Private </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998331"></a>Class Hierarchy </p> </td> </tr> <tr> <td scope="row" rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998333"></a>Interface Method </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998335"></a>0 - 127 </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998337"></a>Public </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998339"></a>Class </p> </td> </tr> </tbody></table><br><h4 class="Head3"><a name="pgfId-7051"></a>4.3.7.1 <a name="13665"></a>Package</h4><p class="Paragraph"><a name="pgfId-7052"></a>All package referencesfrom within a CAP file are assigned private <a name="marker-14188"></a>packagetokens. Package token values must be in the range from 0 to 127,inclusive. The tokens for all the packages referenced from classes in aCAP file are numbered consecutively starting at zero. The ordering ofpackage tokens is not specified.</p><h4 class="Head3"><a name="pgfId-7053"></a>4.3.7.2 <a name="14497"></a>Classesand Interfaces</h4><p class="Paragraph"><a name="pgfId-13188"></a>All externally visibleclasses and interfaces in a package are assigned public<a name="marker-14189"></a> class tokens. Class token values must be inthe range from 0 to 254, inclusive. The tokens for all the publicclasses and interfaces in a package are numbered consecutively startingat zero. The ordering of class tokens is not specified.</p><p class="Paragraph"><a name="pgfId-13215"></a>Package-visible classesand interfaces are not assigned tokens.</p><h4 class="Head3"><a name="pgfId-13190"></a>4.3.7.3 <a name="32517"></a>StaticFields</h4><p class="Paragraph"><a name="pgfId-13191"></a>All externally visiblestatic fields in a package are assigned public <a name="marker-14190"></a>staticfield tokens. The tokens for all externally visible static fields in aclass are numbered consecutively starting at zero. Static fields tokenvalues must be in the range from 0 to 255, inclusive. The ordering ofstatic field tokens is not specified.</p><p class="Paragraph"><a name="pgfId-13206"></a>Package-visible andprivate static fields are not assigned tokens. In addition, no tokensare assigned for final static fields that are initialized to primitive,compile-time constants, as these fields are never represented as fieldsin CAP files.</p><h4 class="Head3"><a name="pgfId-7057"></a>4.3.7.4 <a name="30947"></a>StaticMethods and Constructors</h4><p class="Paragraph"><a name="pgfId-7058"></a>All externally visiblestatic methods and constructors in a package are assigned public<a name="marker-14191"></a> static method tokens. Constructors areincluded in this category because they are statically bound. Staticmethod token values must be in the range from 0 to 255, inclusive. Thetokens for all the externally visible static methods and constructorsin a class are numbered consecutively starting at zero. The ordering ofstatic method tokens is not specified.</p><p class="Paragraph"><a name="pgfId-13197"></a>Package-visible andprivate static methods as well as package-visible and privateconstructors are not assigned tokens.</p><h4 class="Head3"><a name="pgfId-7059"></a>4.3.7.5 <a name="30617"></a>InstanceFields</h4><p class="Paragraph"><a name="pgfId-13096"></a>All instance fieldsdefined in a package are assigned either public or private <a name="marker-14192"></a>instance field tokens. The scope of a set ofinstance field tokens is limited to the class that declares theinstance fields, not including the fields declared by superclasses ofthat class.</p><p class="Paragraph"><a name="pgfId-13241"></a>Instance field tokenvalues must be in the range from 0 to 255, inclusive. Public andprivate tokens for instance fields are assigned from the samenamespace. The tokens for all the instance fields in a class arenumbered consecutively starting at zero, except that the token after anint field is skipped and the token for the following field is numberedtwo greater than the token of the int field.</p><p class="Paragraph"><a name="pgfId-998545"></a>Within a class, tokensfor externally visible fields must be numbered less than the tokens forpackage and private fields. For public tokens, the tokens for referencetype fields must be numbered greater than the tokens for primitive typefields. For private tokens, the tokens for reference type fields mustbe numbered less than the tokens for primitive type fields. Beyondthat, the ordering of instance field tokens in a class is notspecified.</p><br><table class="Titled" border="1" bordercolorlight="#FFFFFF" bordercolordark="#000000" cellpadding="5" cellspacing="0" dir="ltr"> <caption class="TableCaption"><a name="pgfId-998548"> </a> TABLE 4-3<br>Tokens For Instance Fields </caption> <thead><tr> <th scope="col" rowspan="1" colspan="1" bgcolor="#cccccc"> <p class="TableHead"><a name="pgfId-998795"></a>Visibility </p> </th> <th scope="col" rowspan="1" colspan="1" bgcolor="#cccccc"> <p class="TableHead"><a name="pgfId-998797"></a>Category </p> </th> <th scope="col" rowspan="1" colspan="1" bgcolor="#cccccc"> <p class="TableHead"><a name="pgfId-998799"></a>Type </p> </th> <th scope="col" rowspan="1" colspan="1" bgcolor="#cccccc"> <p class="TableHead"><a name="pgfId-998824"></a>Token Value </p> </th> </tr> </thead> <tbody> <tr> <td scope="row" rowspan="5" colspan="1"> <p class="TableText"><a name="pgfId-998564"></a><br>public and protected fields (public tokens) <br> </p> </td> <td rowspan="3" colspan="1"> <p class="TableText"><a name="pgfId-998566"></a>primitive </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998568"></a><kbd class="Filename-Command">boolean</kbd> </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998570"></a>0 </p> </td> </tr> <tr> <td scope="row" rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998576"></a><kbd class="Filename-Command">byte</kbd> </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998578"></a>1 </p> </td> </tr> <tr> <td scope="row" rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998584"></a><kbd class="Filename-Command">short</kbd> </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998586"></a>2 </p> </td> </tr> <tr> <td scope="row" rowspan="2" colspan="1"> <p class="TableText"><a name="pgfId-998590"></a>reference </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998592"></a><kbd class="Filename-Command">byte[]</kbd> </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998594"></a>3 </p> </td> </tr> <tr> <td scope="row" rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998600"></a><kbd class="Filename-Command">Applet</kbd> </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998602"></a>4 </p> </td> </tr> <tr> <td scope="row" rowspan="4" colspan="1"> <p class="TableText"><a name="pgfId-998604"></a><br>package and private fields (private tokens) </p> </td> <td rowspan="2" colspan="1"> <p class="TableText"><a name="pgfId-998606"></a>reference </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998608"></a><kbd class="Filename-Command">short[]</kbd> </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998610"></a>5 </p> </td> </tr> <tr> <td scope="row" rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998616"></a><kbd class="Filename-Command">Object</kbd> </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998618"></a>6 </p> </td> </tr> <tr> <td scope="row" rowspan="2" colspan="1"> <p class="TableText"><a name="pgfId-998622"></a>primitive </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998624"></a><kbd class="Filename-Command">int</kbd> </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998626"></a>7 </p> <p class="TableText"><a name="pgfId-998627"></a> </p> </td> </tr> <tr> <td scope="row" rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998633"></a><kbd class="Filename-Command">short</kbd> </p> </td> <td rowspan="1" colspan="1"> <p class="TableText"><a name="pgfId-998635"></a>9 </p> </td> </tr> </tbody></table><br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -