Site Tools

Sidebar

Smart Card Solution

User Manual

JavaCard API Samples

Java Card Specification

Knowledge Sharing

javacard:jcvm:6.13.2_field_descriptor_info

6.13.2 field_descriptor_info

The field_descriptor_info structure is used to describe a field defined in this package:

The items of the field_descriptor_info structure are as follows:

token

The token item represents the token of this field. If this field is private or package-visible static field it does not have a token assigned. In this case the value of the token item must be 0xFF.

access_flags

The access_flags item is a mask of modifiers used to describe the access permission to and properties of this field. The access_flags modifiers for fields are shown in the following table.

Name

Value

ACC_PUBLIC

0x01

ACC_PRIVATE

0x02

ACC_PROTECTED

0x04

ACC_STATIC

0x08

ACC_FINAL

0x10

The field access and modifier flags defined in the table above are a subset of those defined for fields in a Java class file. They have the same meaning, and are set under the same conditions, as the corresponding flags in a Java class file.

All other flag values are reserved. Their values must be zero.

field_ref

The field_ref item represents a reference to this field. If the ACC_STATIC flag is equal to 1, this item represents a static_field_ref as defined in the CONSTANT_StaticFieldref structure ( Section 6.7.3, **CONSTANT_StaticFieldref** and CONSTANT_StaticMethodref).

If the ACC_STATIC flag is equal to 0, this item represents a reference to an instance field. It contains a class_ref item and an instance field token item. These items are defined in the same manner as in the CONSTANT_InstanceFieldref structure ( Section 6.7.2, **CONSTANT_InstanceFieldref**, CONSTANT_VirtualMethodref, and CONSTANT_SuperMethodref).

type

The type item indicates the type of this field. directly or indirectly. If this field is a primitive type (boolean, byte, short, or int) the high bit of this item is equal to 1, otherwise the high bit of this item is equal to 0.

primitive_type

The primitive_type item represents the type of this field using the values in the table below. As noted above, the high bit of the primitive_type item is equal to 1.

Data Type

Value

boolean

0x0002

byte

0x0003

short

0x0004

int

0x0005

reference_type

The reference_type item represents a 15-bit offset into the type_descriptor_info structure. The item at the offset must represent the reference type of this field. As noted above, the high bit of the reference_type item is equal to 0.

javacard/jcvm/6.13.2_field_descriptor_info.txt · Last modified: 2017/05/13 04:09 (external edit)