Site Tools

Sidebar

Smart Card Solution

User Manual

JavaCard API Samples

Java Card Specification

Knowledge Sharing

Database error: contact an administrator.
javacard:jcvm:6.7.2_constant_instancefieldref_constant_virtualmethodref_and_constant_supermethodref

6.7.2 CONSTANT_InstanceFieldref, CONSTANT_VirtualMethodref, and CONSTANT_SuperMethodref

References to instance fields, and virtual methods are represented by similar structures:

The items in these structures are as follows:

tag

The tag item of a CONSTANT_InstanceFieldref_info structure has the value CONSTANT_InstanceFieldref (2).

The tag item of a CONSTANT_VirtualMethodref_info structure has the value CONSTANT_VirtualMethodref (3).

The tag item of a CONSTANT_SuperMethodref_info structure has the value CONSTANT_SuperMethodref (4).

class

The class item represents the class associated with the referenced instance field, virtual method, or super method invocation. It is a class_ref structure ( Section 6.7.1, CONSTANT_Classref). If the referenced class is defined in this package the high bit is equal to zero. If the reference class is defined in an imported package the high bit of this structure is equal to one.

The class referenced in the CONSTANT_InstanceField_info structure must be the class that contains the declaration of the instance field.

The class referenced in the CONSTANT_VirtualMethodref_info structure must be a class that contains a declaration or definition of the virtual method.

The class referenced in the CONSTANT_SuperMethodref_info structure must be the class that defines the method that contains the Java language-level super invocation.

token

The token item in the CONSTANT_InstanceFieldref_info structure represents an instance field token ( Section 4.3.7.5, Instance Fields) of the referenced field. The value of the instance field token is defined within the scope of the class indicated by the class item.

The token item of the CONSTANT_VirtualMethodref_info structure represents the virtual method token ( Section 4.3.7.6, Virtual Methods) of the referenced method. The virtual method token is defined within the scope of the hierarchy of the class indicated by the class item. If the referenced method is public or protected the high bit of the token item is zero. If the referenced method is package-visible the high bit of the token item is one. In this case the class item must represent a reference to a class defined in this package.

The token item of the CONSTANT_SuperMethodref_info structure represents the virtual method token ( Section 4.3.7.6, Virtual Methods) of the referenced method. Unlike in the CONSTANT_VirtualMethodref_info structure, the virtual method token is defined within the scope of the hierarchy of the superclass of the class indicated by the class item. If the referenced method is public or protected the high bit of the token item is zero. If the referenced method is package-visible the high bit of the token item is one. In the latter case the class item must represent a reference to a class defined in this package and at least one superclass of the class that contains a definition of the virtual method must also be defined in this package.

javacard/jcvm/6.7.2_constant_instancefieldref_constant_virtualmethodref_and_constant_supermethodref.txt · Last modified: 2017/05/13 04:10 (external edit)