Smart Card Solution
User Manual
- R502 Manual
JavaCard API Samples
- Algorithm
Java Card Specification
Knowledge Sharing
Smart Card Solution
User Manual
JavaCard API Samples
Java Card Specification
Knowledge Sharing
References to static fields and methods are represented by similar structures:
The items in these structures are as follows:
tag
The tag item of a CONSTANT_StaticFieldref_info structure has the value CONSTANT_StaticFieldref (5).
The tag item of a CONSTANT_StaticMethodref_info structure has the value CONSTANT_StaticMethodref (6).
static_field_ref and static_method_ref
The static_field_ref and static_method_ref item represents a reference to a static field or static method, respectively. Static method references include references to static methods, constructors, and private virtual methods.
If the referenced item is defined in this package the structure represents an internal_ref and the high bit of the structure is zero. If the referenced item is defined in another package the structure represents an external_ref and the high bit of the structure is one.
internal_ref
The internal_ref item represents a reference to a static field or method defined in this package. The items in the structure are:
padding
The padding item is equal to 0.
offset
The offset item of a CONSTANT_StaticFieldref_info structure represents a 16-bit offset into the Static Field Image defined by the Static Field component ( Section 6.10, Static Field Component) to this static field.
The offset item of a CONSTANT_StaticMethodref_info structure represents a 16-bit offset into the info item of the Method Component ( Section 6.9, Method Component) to a method_info structure. The method_info structure must represent the referenced method.
external_ref
The external_ref item represents a reference to a static field or method defined in an imported package. The items in the structure are:
package_token
The package_token item represents a package token ( Section 4.3.7.1, Package) defined in the Import Component ( Section 6.6, Import Component) of this CAP file. The value of this token must be a valid index into the packages table item of the import_component structure. The package represented at that index must be the imported package.
The value of the package token must be between 0 and 127, inclusive.
The high bit of the package_token item is equal to one.
class_token
The class_token item represents the token ( Section 4.3.7.2, Classes and Interfaces) of the class of the referenced class. It has the value of the class token of the class as defined in the Export file of the imported package.
The class indicated by the class_token item must define the referenced field or method.
token
The token item of a CONSTANT_StaticFieldref_info structure represents a static field token ( Section 4.3.7.3, Static Fields) as defined in the Export file of the imported package. It has the value of the token of the referenced field.
The token item of a CONSTANT_StaticMethodref_info structure represents a static method token ( Section 4.3.7.4, Static Methods and Constructors) as defined in the Export file of the imported package. It has the value of the token of the referenced method.