Site Tools


Sidebar

Smart Card Solution

User Manual

JavaCard API Samples

Java Card Specification

Knowledge Sharing

javacard:jcvm:6.9.2_method_info

6.9.2 method_info

The method_info structure is defined as follows:

The items in the method_info structure are as follows:

method_header

The method_header item represents either a method_header_info or an extended_method_header_info structure:

The items of the method_header_info and extended_method_header_info structures are as follows:

flags

The flags item is a mask of modifiers defined for this method. Valid flag values are shown in the following table.

Flags

Values

ACC_EXTENDED

0x8

ACC_ABSTRACT

0x4

The value of the ACC_EXTENDED flag must be one if the method_header is represented by an extended_method_header_info structure. Otherwise the value must be zero.

The value of the ACC_ABSTRACT flag must be one if this method is defined as abstract. In this case the bytecodes array must be empty. If this method is not abstract the value of the ACC_ABSTRACT flag must be zero.

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

padding

The padding item has the value of zero. This item is only defined for the extended_method_header_info structure.

max_stack

The max_stack item indicates the maximum number of 16-bit cells required on the operand stack during execution of this method.

Stack entries of type int are represented in two 16-bit cells, while all others are represented in one 16-bit cell.

nargs

The nargs item indicates the number of 16-bit cells required to represent the parameters passed to this method, including the this pointer if this method is a virtual method.

Parameters of type int are represented in two 16-bit cells, while all others are represented in one 16-bit cell.

max_locals

The max_locals item indicates the number of 16-bit cells required to represent the local variables declared by this method, not including the parameters passed to this method on invocation.<SUP>[8]</SUP>

Local variables of type int are represented in two 16-bit cells, while all others are represented in one 16-bit cell. If an entry in the local variables array of the stack frame is reused to store more than one local variable (for example, local variables from separate scopes), the number of cells required for storage is two if one or more of the local variables is of type int.

bytecodes[]

The bytecodes item represents an array of Java Card bytecodes that implement this method. Valid instructions are defined in Chapter 7, “Java Card Virtual Machine Instruction Set.” The impdep1 and impdep2 bytecodes cannot be present in the bytecodes array item.

If this method is abstract the bytecodes item must contain zero elements.

javacard/jcvm/6.9.2_method_info.txt · Last modified: 2017/05/13 04:12 (external edit)