CN113326041B - Virtual method calling method, electronic equipment and computer readable storage medium - Google Patents

Virtual method calling method, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN113326041B
CN113326041B CN202110878229.5A CN202110878229A CN113326041B CN 113326041 B CN113326041 B CN 113326041B CN 202110878229 A CN202110878229 A CN 202110878229A CN 113326041 B CN113326041 B CN 113326041B
Authority
CN
China
Prior art keywords
class
virtual method
called
belongs
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110878229.5A
Other languages
Chinese (zh)
Other versions
CN113326041A (en
Inventor
陆舟
于华章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN202110878229.5A priority Critical patent/CN113326041B/en
Publication of CN113326041A publication Critical patent/CN113326041A/en
Application granted granted Critical
Publication of CN113326041B publication Critical patent/CN113326041B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a virtual method calling method, electronic equipment and a computer readable storage medium, and belongs to the field of Java cards. The Java card determines the address of the class to which the virtual method to be called currently belongs according to the virtual method calling instruction, the address of the object actual class is obtained according to object reference in the virtual machine operation stack, when the address of the class to which the virtual method to be called currently belongs is different from the address of the object actual class, the index of the virtual method to be called is searched in the virtual method mapping table of each sub-class of the class to which the virtual method to be called currently belongs, if the index of the virtual method to be called is not searched, the index of the virtual method to be called is searched in the parent class of the class to which the virtual method to be called currently belongs, and the address of the virtual method to be called actually is obtained from the virtual method table of the class to which the virtual method to be called currently belongs according to the index of the virtual method to be called after the index of the virtual method to be called is searched. The invention improves the expansibility of the API of the Java card.

Description

Virtual method calling method, electronic equipment and computer readable storage medium
Technical Field
The present invention relates to the field of Java cards, and in particular, to a virtual method calling method, an electronic device, and a computer-readable storage medium.
Background
The Java card is a smart card capable of running Java programs, and implements functions of applications by interpreting Java bytecodes in an execution application package. The generation process of the Java bytecode comprises the following steps: the method comprises the steps of writing Java application codes by using API of a Java card, compiling the Java application codes to obtain class byte codes, converting the class byte codes into Java byte codes which can be executed by the Java card through a conversion tool, and executing the Java byte codes by the Java card through a virtual method calling instruction.
In the prior art, when a Java card searches for a called virtual method through a virtual method calling instruction, the virtual method can only be searched in a way of indexing a parent class by a subclass, and the disadvantage of this way is that once an application file package to which the parent class belongs is upgraded, the application file package to which the subclass belongs must regenerate Java byte codes to continue running, because after the application file package to which the parent class belongs is upgraded, the address of the virtual method in the application file to which the parent class belongs will be changed, which brings great inconvenience to the extension of the API of the Java card.
Disclosure of Invention
In order to solve the defects in the prior art, the invention provides a virtual method calling method, electronic equipment and a computer readable storage medium.
In a first aspect, the present invention provides a method for calling a virtual method, including the following steps:
step 101: the method comprises the steps that a Java card obtains a virtual method to be called in a constant pool according to a virtual method calling instruction, obtains reference of a class to which the virtual method to be called currently belongs and an index of the virtual method to be called from the virtual method to be called, and determines an address of the class to which the virtual method to be called currently belongs according to the reference of the class to which the virtual method to be called currently belongs;
step 102: the Java card acquires object reference from a virtual machine running stack, acquires object data from a stored object table by taking the object reference as an index, acquires the identifier of a packet to which an object actual class belongs and the reference of the object actual class from the object data, and acquires the address of the object actual class according to the identifier of the packet to which the object actual class belongs and the reference of the object actual class;
step 103: the Java card judges whether the address of the current class of the virtual method to be called is the same as the address of the actual class of the object, if so, step 109 is executed, otherwise, a linked list is established according to the address of the current class of the virtual method to be called and the address of the actual class of the object, and step 104 is executed;
step 104: the Java card judges whether the linked list has the address of the direct subclass of the class to which the virtual method to be called currently belongs, if so, the step 105 is executed, otherwise, the step 107 is executed;
step 105: the Java card judges whether an index of the virtual method to be called exists in a virtual method mapping table of a direct subclass of a class to which the virtual method to be called currently belongs, if so, step 106 is executed, otherwise, step 107 is executed;
step 106: the Java card sets the address of the class to which the virtual method to be called currently belongs as the address of the direct subclass of the class to which the virtual method to be called currently belongs, sets the index of the virtual method to be called as the index of the virtual method to be called in the virtual method mapping table of the direct subclass of the class to which the virtual method to be called currently belongs, and returns to the step 104;
step 107: the Java card judges whether an index of the virtual method to be called exists in a virtual method table of a class to which the virtual method to be called currently belongs, if so, step 109 is executed, otherwise, step 108 is executed;
step 108: the Java card acquires the reference of the parent class of the class to which the virtual method to be called currently belongs from the class to which the virtual method to be called currently belongs, determines the address of the class to which the virtual method to be called currently belongs according to the reference of the parent class of the class to which the virtual method to be called currently belongs, acquires the class to which the virtual method to be called currently belongs according to the address of the class to which the virtual method to be called currently belongs, and returns to the step 107;
step 109: the Java card acquires the address of the actual called virtual method from the virtual method table of the class to which the virtual method to be called currently belongs according to the index of the virtual method to be called;
the virtual method mapping table includes an index of a virtual method inherited from a parent class of a class to which the virtual method mapping table belongs and an index of a virtual method included in the class to which the virtual method mapping table belongs.
In a second aspect, the present invention provides an electronic device comprising: a memory and a processor;
a memory for storing a computer program;
and the processor is used for operating the computer program stored in the memory to execute the calling method of the virtual method in the application.
In a third aspect, the present invention provides a computer-readable storage medium for storing a computer program which, when run on a computer, causes the computer to execute a method for calling a virtual method in the present application.
The invention provides a virtual method calling method, electronic equipment and a computer readable storage medium, after an application file package to which a parent class belongs is upgraded, the application file package to which a subclass belongs can still normally run without regenerating Java byte codes, and the expansibility of an API (application program interface) of a Java card is improved.
Drawings
Fig. 1 is a flowchart of a method for calling a virtual method according to embodiment 1 of the present invention;
fig. 2 is a flowchart of a method for generating a virtual method mapping table according to embodiment 2 of the present invention;
fig. 3 is a flowchart of a method for calling a virtual method according to embodiment 3 of the present invention;
fig. 4 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The present application provides a virtual method calling method, an electronic device, and a computer-readable storage medium, and the following describes in detail embodiments of the present application with reference to the accompanying drawings. Examples of which are illustrated in the accompanying drawings. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
It will be understood by those within the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention are described in further detail below with reference to the accompanying drawings.
Example 1
Embodiment 1 of the present invention provides a method for calling a virtual method, and as shown in fig. 1, the method includes the following steps:
step 101: the Java card acquires a virtual method to be called in the constant pool according to the virtual method calling instruction, acquires the reference of the class to which the virtual method to be called currently belongs and the index of the virtual method to be called from the virtual method to be called, and determines the address of the class to which the virtual method to be called currently belongs according to the reference of the class to which the virtual method to be called currently belongs;
step 102: the Java card acquires object reference from a virtual machine running stack, acquires object data from a stored object table by taking the object reference as an index, acquires the identifier of a packet to which an object actual class belongs and the reference of the object actual class from the object data, and acquires the address of the object actual class according to the identifier of the packet to which the object actual class belongs and the reference of the object actual class;
step 103: judging whether the address of the current class of the virtual method to be called is the same as the address of the actual class of the object by the Java card, if so, executing step 109, otherwise, establishing a linked list according to the address of the current class of the virtual method to be called and the address of the actual class of the object, and executing step 104;
step 104: judging whether the linked list has the address of the direct subclass of the class to which the virtual method to be called currently belongs or not by the Java card, if so, executing the step 105, otherwise, executing the step 107;
step 105: the Java card judges whether an index of the virtual method to be called exists in a virtual method mapping table of the direct subclass of the class to which the virtual method to be called currently belongs, if so, step 106 is executed, otherwise, step 107 is executed;
step 106: the Java card sets the address of the class to which the virtual method to be called currently belongs as the address of the direct subclass of the class to which the virtual method to be called currently belongs, sets the index of the virtual method to be called as the index of the virtual method to be called in the virtual method mapping table of the direct subclass of the class to which the virtual method to be called currently belongs, and returns to the step 104;
step 107: the Java card judges whether the virtual method table of the class to which the virtual method to be called currently belongs has an index of the virtual method to be called, if so, step 109 is executed, otherwise, step 108 is executed;
step 108: the Java card obtains the reference of the parent class of the class to which the virtual method to be called currently belongs from the class to which the virtual method to be called currently belongs, determines the address of the class to which the virtual method to be called currently belongs according to the reference of the parent class of the class to which the virtual method to be called currently belongs, obtains the class to which the virtual method to be called currently belongs according to the address of the class to which the virtual method to be called currently belongs, and returns to step 107;
step 109: the Java card acquires the address of the actual called virtual method from the virtual method table of the class to which the virtual method to be called currently belongs according to the index of the virtual method to be called;
the virtual method mapping table includes an index of a virtual method inherited from a parent class of a class to which the virtual method mapping table belongs and an index of a virtual method included in the class to which the virtual method mapping table belongs.
Optionally, in this embodiment, the obtaining, by the Java card, the virtual method to be called in the constant pool according to the virtual method calling instruction specifically includes: the Java card obtains instruction operands from the virtual method calling instructions, and obtains virtual methods to be called in the constant pool by taking the instruction operands as indexes.
Optionally, in this embodiment, the obtaining the virtual method to be called in the constant pool with the instruction operand as an index specifically includes:
step A1: the Java card acquires the address of a packet information address list and the identifier of a packet to which the virtual method to be called belongs from the global variable of the memory, and acquires the constant pool component information of the packet to which the virtual method to be called belongs according to the address of the packet information address list and the identifier of the packet to which the virtual method to be called belongs;
step A2: the Java card analyzes the constant pool component information of the package to which the virtual method to be called belongs to obtain a constant pool address, obtains data corresponding to the constant pool address to obtain a constant pool component, and obtains the virtual method to be called in the constant pool component by taking the instruction operand as an index.
Optionally, in this embodiment, obtaining, from the virtual method to be called, a reference of a class to which the virtual method to be called currently belongs and an index of the virtual method to be called, and determining, according to the reference of the class to which the virtual method to be called currently belongs, an address of the class to which the virtual method to be called currently belongs specifically includes:
step C1: the Java card acquires data on the last byte from the virtual method to be called to obtain the index of the virtual method to be called, acquires the reference of the class to which the virtual method to be called currently belongs from the class to which the virtual method to be called currently belongs, judges whether the highest bit of the reference of the class to which the virtual method to be called currently belongs is a second preset value or not, if so, executes the step C2, otherwise, executes the step C3;
step C2: the method comprises the steps that a Java card obtains the quote of a parent class of a class to which a virtual method to be called currently belongs from the class to which the virtual method to be called currently belongs, respectively obtains the index of the class to which the virtual method to be called currently belongs and the index of a package to which the virtual method to be called belongs from the quote of the parent class of the class to which the virtual method to be called currently belongs, obtains a corresponding export table according to the index of the package to which the virtual method to be called belongs, and obtains the address of the class to which the virtual method to be called currently belongs in the export table according to the index of the class to which the virtual method to be called currently belongs;
step C3: the Java card obtains the base address of the class component of the packet to which the virtual method to be called belongs from the packet information to which the virtual method to be called belongs, and obtains the address of the class to which the virtual method to be called currently belongs according to the base address of the class component of the packet to which the virtual method to be called belongs and the address offset of the class to which the virtual method to be called currently belongs.
Optionally, in this embodiment, the obtaining object data in the stored object table by using the object reference as an index specifically includes:
step B1: the Java card acquires a base address of the object data, an initial number of the object data and a maximum length of an address of the object data, subtracts the reference of the object and the initial number of the object data to obtain a second operation value, multiplies the second operation value and the maximum length of the address of the object data to obtain a third operation value, and adds the third operation value and the base address of the object data to obtain the address of the object data;
step B2: the Java card acquires data corresponding to the address of the object data to obtain the object data.
Optionally, in this embodiment, obtaining the address of the actual object class according to the identifier of the packet to which the actual object class belongs and the reference of the actual object class specifically includes:
step D1: the Java card takes the identifier of the packet to which the object actual class belongs as an index to acquire packet address information to which the object actual class belongs in a packet information address list, acquires data corresponding to the packet address information to which the object actual class belongs to obtain packet information to which the object actual class belongs, and acquires data on the first four bytes from the packet information to which the object actual class belongs to obtain the initial address of a class component of the packet to which the object actual class belongs;
step D2: and the Java card adds the initial address of the class component of the packet to which the actual class of the object belongs and the reference of the actual class of the object to obtain the address of the actual class of the object.
Optionally, in this embodiment, the establishing a linked list according to the address of the class to which the virtual method to be called currently belongs and the address of the actual class of the object specifically includes:
step M1: establishing a linked list by the Java card;
step M2: adding the address of the actual class of the object into a linked list by the Java card;
step M3: judging whether the address of the current class of the virtual method to be called is the same as the address of the actual class of the object by the Java card, if so, finishing the establishment of the linked list, otherwise, executing the step M4;
step M4: the Java card sets the address of the object real class as the address of the parent class of the object real class, and returns to step M2.
Optionally, in this embodiment, the determining, by the Java card, whether an address of a direct subclass of a class to which the virtual method to be called currently belongs exists in the linked list specifically includes: the Java card searches a node where the class to which the virtual method to be called currently belongs in a linked list according to the address of the class to which the virtual method to be called currently belongs, judges whether the node exists behind the node where the class to which the virtual method to be called currently belongs, if so, judges that the class to which the virtual method to be called currently belongs has a direct subclass, otherwise, judges that the class to which the virtual method to be called currently belongs does not have the direct subclass.
Optionally, in this embodiment, before step 105, the method further includes: the Java card obtains and stores the number of the virtual methods of the class to which the virtual method to be called belongs and the initial numbers of the virtual methods of the class to which the virtual method to be called belongs from the class to which the virtual method to be called currently belongs.
Optionally, in this embodiment, the determining, by the Java card, whether an index of the virtual method to be called exists in the virtual method table of the class to which the virtual method to be called currently belongs includes: and the Java card obtains a fourth operation value according to the number of the virtual methods of the class to which the virtual method to be called belongs and the initial number of the virtual method of the class to which the virtual method to be called belongs, judges whether the index of the virtual method to be called is greater than or equal to the initial number of the virtual method of the class to which the virtual method to be called belongs and less than the fourth operation value, judges that the index of the virtual method to be called exists in the virtual method table of the class to which the virtual method to be called currently belongs if the index of the virtual method to be called exists in the virtual method table of the class to which the virtual method to be called currently belongs, and judges that the index of the virtual method to be called does not exist in the virtual method table of the class to which the virtual method to be called currently belongs if the index of the virtual method to be called currently exists in the virtual method table.
Optionally, in this embodiment, step 108 specifically includes:
step N1: the Java card acquires the reference of the parent class of the class to which the virtual method to be called currently belongs from the class to which the virtual method to be called currently belongs, judges whether the highest bit of the reference of the parent class of the class to which the virtual method to be called currently belongs is a second preset value, if so, executes the step N2, otherwise, executes the step N3;
step N2: the Java card obtains the index of the parent class of the class to which the virtual method to be called currently belongs and the index of the packet to which the parent class of the class to which the virtual method to be called currently belongs from the reference of the parent class of the class to which the virtual method to be called currently belongs, and respectively serves as the index of the class to which the virtual method to be called currently belongs and the index of the packet to which the virtual method to be called belongs, obtains a corresponding export table according to the index of the packet to which the virtual method to be called belongs, obtains the address of the class to which the virtual method to be called currently belongs in the export table according to the index of the class to which the virtual method to be called currently belongs, and returns to step 107;
step N3: the Java card obtains the base address of the class component of the packet to which the virtual method to be called belongs from the packet information to which the virtual method to be called belongs, obtains the address of the class to which the virtual method to be called currently belongs according to the base address of the class component of the packet to which the virtual method to be called belongs and the address offset of the class to which the virtual method to be called currently belongs, and returns to step 107.
Optionally, in this embodiment, step 109 specifically includes: and the Java card performs subtraction operation according to the index of the virtual method to be called and the initial number of the virtual method of the class to which the virtual method to be called belongs to obtain a fifth operation value, and the actual called virtual method is obtained in the virtual method table of the class to which the virtual method to be called currently belongs by taking the fifth operation value as the index.
Optionally, in this embodiment, a generation process of the virtual method mapping table is further included, including the following steps:
step S1: the conversion tool acquires a class from the class component and records the class as a current class, and acquires the initial number of the virtual method of the current class and the number of the virtual methods of the current class from the current class;
step S2: the conversion tool creates a virtual method mapping table of the current class according to the initial number of the virtual method of the current class and the number of the virtual methods of the current class, and initializes the virtual method mapping table of the current class;
step S3: the conversion tool acquires the reference of the parent class of the current class from the current class, judges whether the highest bit of the reference of the parent class of the current class is a second preset value or not, if so, executes step S4, otherwise, executes step S5;
step S4: the conversion tool respectively obtains the index of the parent class of the current class and the index of the packet to which the parent class of the current class belongs from the reference of the parent class of the current class, obtains a pre-stored export table address, obtains the parent class of the current class according to the index of the packet to which the parent class of the current class belongs and the export table address, and executes step S6;
step S5: the conversion tool obtains the base address of the class component of the package to which the current class belongs, obtains the parent class of the current class according to the base address of the class component of the package to which the current class belongs and the reference of the parent class of the current class, and executes the step S6;
step S6: the conversion tool acquires the initial number of the virtual method of the parent class of the current class and the number of the virtual methods of the parent class of the current class from the parent class of the current class, and updates the virtual method mapping table of the current class according to the initial number of the virtual method of the parent class of the current class and the number of the virtual methods of the parent class of the current class;
step S7: and adding the virtual method mapping table of the current class to the current class by the conversion tool to obtain the current class containing the virtual method mapping table.
The embodiment provides a virtual method calling method, which indexes virtual methods in an original application and a new application through a virtual method mapping table, and after an application file package to which a parent class belongs is upgraded, the application file package to which a child class belongs can still normally run without regenerating Java byte codes, so that the virtual method mapping table can serve the original application and the new application, and the expansibility of an API (application programming interface) of a Java card is improved.
Example 2
Embodiment 2 of the present invention provides a method for generating a virtual method mapping table, as shown in fig. 2, including the following steps:
step 201: the conversion tool acquires all classes contained in the class component from the class component according to the class component composition structure and stores the classes in a cache region;
specifically, each class component is represented by a class component composition structure;
the class component composition structure specifically comprises: the package comprises a class component label, a class component size, a signature pool length, a signature pool, an interface list and a class list, wherein all classes contained in the package are stored in the class list;
optionally, in this embodiment, step 201 specifically includes: the conversion tool analyzes the class component to obtain a class component label, a class component size, a signature pool length, a signature pool, an interface list and a class list, and stores the class list in a cache region.
Step 202: the conversion tool acquires a class from the cache region and records the class as a current class, and acquires the initial number of the virtual method of the current class and the number of the virtual methods of the current class from the current class;
optionally, each class in the class component is represented by a class information structure;
one class information structure specifically includes: bit threshold, super class structure, size of instance domain, index value of instance domain of initial reference type, number of instance domain of reference type, initial number of virtual method of class, initial number of virtual method of packet, virtual method mapping table of common attribute or covering attribute of packet, visual virtual method mapping table of packet, implemented interface list and implemented remote interface;
the conversion tool acquires a class from the cache region and records the class as a current class, specifically: the conversion tool intercepts a class information structure from the class list, and records the intercepted class information structure as a current class;
for example: the current class is specifically: 060000010000800000 FF 00
01 /*base*/
04 /*count*/
00 08
00 0C
00 10
00 15
The initial number of the virtual method of the current class is 01, and the number of the virtual methods of the current class is 04;
step 203: the conversion tool creates a virtual method mapping table of the current class according to the initial number of the virtual methods of the current class and the number of the virtual methods of the current class, and initializes the virtual method mapping table of the current class;
optionally, in this embodiment, step 203 specifically includes: the conversion tool carries out summation operation on the initial number of the virtual method of the current class and the number of the virtual methods of the current class to obtain a first length value, creates a virtual method mapping table with the length of the first length value as a virtual method mapping table of the current class, and initializes each item in the virtual method mapping table of the current class to a first preset value;
optionally, in this embodiment, the first preset value specifically is: FF;
for example: the starting number of the virtual method of the current class is 01, the number of the virtual methods of the current class is 04, the first length value is 05, and the first preset value is FF; the created virtual method mapping table of the current class is as follows: 0000000000, initializing the virtual method mapping table of the current class to obtain a virtual method mapping table as follows: FF FF FF FF FF, respectively;
step 204: the conversion tool acquires the reference of the parent class of the current class from the current class, judges whether the highest bit of the reference of the parent class of the current class is a second preset value or not, if so, executes step 205, otherwise, executes step 207;
optionally, in this embodiment, the conversion tool obtains the reference of the parent class of the current class from the current class, specifically: the conversion tool acquires data on the second byte and the third byte from the class information structure of the current class to obtain the reference of the parent class of the current class;
optionally, in this embodiment, the second preset value is specifically 1;
for example: the reference to the parent class of the current class is specifically: 0000, the highest bit is not the second preset value, go to step 207;
step 205: respectively acquiring the index of the parent class of the current class and the index of the package to which the parent class of the current class belongs from the reference of the parent class of the current class by the conversion tool;
optionally, in this embodiment, step 205 specifically includes: the conversion tool obtains the 0 th bit to the 7 th bit from the reference of the parent class of the current class to obtain the index of the parent class of the current class, and obtains the 8 th bit to the 14 th bit to obtain the index of the packet to which the parent class of the current class belongs;
step 206: the conversion tool obtains a pre-stored export table address list, obtains an export table address corresponding to the index of the packet to which the parent class of the current class belongs from the export table address list according to the index of the packet to which the parent class of the current class belongs, obtains a corresponding export table according to the export table address corresponding to the index of the packet to which the parent class of the current class belongs, searches the export table for the address offset of the parent class of the current class according to the index of the parent class of the current class, obtains the address of the parent class of the current class according to the class component base address of the packet to which the parent class of the current class belongs and the address offset of the parent class of the current class, obtains the parent class of the current class according to the address of the parent class of the current class, and executes step 208;
step 207: the conversion tool obtains a base address of a class component of a pre-stored package to which the current class belongs, obtains an address of a parent class of the current class according to the base address of the class component of the package to which the current class belongs and the reference of the parent class of the current class, obtains the parent class of the current class according to the address of the parent class of the current class, and executes step 208;
optionally, in this embodiment, the obtaining of the address of the parent class of the current class according to the base address of the class component of the package to which the current class belongs and the reference of the parent class of the current class specifically includes: the conversion tool carries out addition operation on the base address of the class component of the packet to which the current class belongs and the reference of the parent class of the current class to obtain the address of the parent class of the current class;
for example: the base address of the class component of the packet to which the current class belongs is specifically: 00000100;
the address of the parent class of the current class is specifically: 00000100;
the parent class of the current class is specifically: 00000100;
step 208: the conversion tool acquires the initial number of the virtual method of the parent class of the current class and the number of the virtual methods of the parent class of the current class from the parent class of the current class;
for example: the initial number of the virtual method of the parent class of the current class is specifically 00, and the number of the virtual methods of the parent class of the current class is specifically 01;
step 209: the conversion tool updates the virtual method mapping table of the current class according to the initial number of the virtual method of the parent class of the current class and the number of the virtual methods of the parent class of the current class;
optionally, in this embodiment, step 209 specifically includes: the conversion tool carries out summation operation on the initial number of the virtual method of the parent class of the previous class and the number of the virtual methods of the parent class of the current class, subtraction operation is carried out on the result obtained by the summation operation and a second preset value to obtain a sixth operation value, and items from 0 th item to sixth operation value of the virtual method mapping table of the current class are correspondingly updated to be 0 to sixth operation value;
optionally, in this embodiment, the second preset value is specifically: 1;
for example: the sixth operation value is specifically: 0;
the updated virtual method mapping table of the current class specifically includes: 00 FF FF FF;
step 210: the conversion tool adds the virtual method mapping table of the current class to obtain the current class containing the virtual method mapping table, and step 211 is executed;
optionally, in this embodiment, the step of adding the virtual method mapping table of the current class to obtain the current class including the virtual method mapping table specifically includes: adding the virtual method mapping table of the current class to the last virtual method of the current class by the conversion tool to obtain the current class containing the virtual method mapping table;
optionally, in this embodiment, the virtual methods of the 0 th to sixth operand items of the virtual method mapping table are the virtual methods inherited by the virtual method mapping table from the parent class of the class to which the virtual method mapping table belongs, and the remaining virtual methods are the virtual methods belonging to the current class;
for example: the current class containing the virtual method mapping table is specifically:
06 00 00 01 00 00 80 00 00 FF 00
01 /*base*/
04 /*count*/
00 08
00 0C
00 10
00 15
00 FF FF/already created VMMT/
Step 211: the conversion tool determines whether there are classes in the cache that have not been acquired, if so, returns to step 202, otherwise, ends.
In this embodiment, an example of executing step 205 and step 206 when the conversion tool determines that the highest bit of the reference of the parent class of the current class is the second preset value in step 204 is further given as follows:
the initial number of the virtual method of the current class is 03, the number of the virtual methods of the current class is 04, the first length value is 07, and the first preset value is FF; the created virtual method mapping table of the current class is as follows: 00000000000000, initializing the virtual method mapping table of the current class to obtain a virtual method mapping table as follows: FF FF FF FF FF FF FF, the reference to the parent class of the current class is specifically: 8003, the highest bit is the second preset value, go to step 205;
the index of the current class is 03, and the index of the packet to which the current class belongs is 00;
the export table address array is specifically:
00 00 1A 87
00 00 1E 06
00 00 20 32
00 00 22 87
00 00 43 02
00 00 45 34
the export table address corresponding to the index of the packet to which the current class belongs is specifically: 00001A 87;
the obtained export table specifically includes:
......
0A
01 07 //size
0D //class_count
// 0 th
00 E2 //class_offset
00 01 //static_field_count
00 01 //static_method_count
// 1 st
01 D2 //class_offset
00 02 //static_field_count
00 03 //static_method_count
// 2 nd
01 FE //class_offset
00 0A //static_field_count
00 03 //static_method_count
// 3 rd
03 02 //class_offset
00 03 //static_field_count
00 08 //static_method_count
......
The index of the parent class of the current class is 03, and the address offset for finding the parent class of the current class in the export table by taking 03 as the index is 0302;
the class component base address of the packet to which the parent class of the current class belongs is specifically: 00000250, the address of the parent class of the current class is specifically: 00000552, respectively;
the parent class of the current class is specifically: 068003020000800000 FF 00
03 /*base*/
04 /*count*/
00 10
00 15
00 1A
00 2C
The initial number of the virtual method of the parent class of the current class is specifically 01, and the number of the virtual methods of the current class is specifically 04;
the virtual method mapping table of the parent class of the current class specifically includes: FF FF FF FF FF FF FF, respectively;
the updated virtual method mapping table of the parent class of the current class specifically includes: 0001020304 FF;
the parent class of the current class containing the virtual method mapping table is specifically:
06 80 03 02 00 00 80 00 00 FF 00
03 /*base*/
04 /*count*/
00 10
00 15
00 1A
00 2C
0001020304 FF/created VMMT
The method for generating the virtual method mapping table provided by the embodiment realizes the creation of the virtual method mapping table for the class without the virtual method mapping table, so that after the application file package to which the parent class belongs is upgraded, the application file package to which the child class belongs does not need to regenerate the Java bytecode, the Java card can search the called virtual method through the created virtual method mapping table, and the expansibility of the API of the Java card is improved.
Example 3
Embodiment 3 of the present invention provides a method for calling a virtual method, where classes related in this embodiment all include virtual method mapping tables, and each virtual method mapping table is generated according to the method for generating a virtual method mapping table in embodiment 2, where the method in this embodiment is shown in fig. 3, and includes the following steps:
step 301: the Java card acquires an instruction operand from a virtual method calling instruction, and acquires a virtual method to be called in a constant pool by taking the instruction operand as an index;
optionally, in this embodiment, the length of the virtual method call instruction is 3 bytes, where a first byte is an instruction operation code, and a second byte and a third byte are instruction operands;
correspondingly, in this embodiment, the obtaining, by the Java card, the instruction operand from the virtual method call instruction specifically includes: the Java card acquires data on a second byte and a third byte from the virtual method calling instruction to obtain an instruction operand;
for example: the virtual method call instruction specifically comprises the following steps: 8B 002 c;
the instruction operation code is specifically: 8B;
the instruction operands are specifically: 002 c;
optionally, in this embodiment, the obtaining the virtual method to be called in the constant pool with the instruction operand as an index specifically includes:
step A1: the Java card acquires the address of a packet information address list and the identifier of a packet to which the virtual method to be called belongs from the global variable of the memory, and acquires the constant pool component information of the packet to which the virtual method to be called belongs according to the address of the packet information address list and the identifier of the packet to which the virtual method to be called belongs;
optionally, obtaining the constant pool component information of the packet to which the virtual method to be called belongs according to the address of the packet information address list and the identifier of the packet to which the virtual method to be called belongs, specifically: the Java card acquires a packet information address list according to the address of the packet information address list, acquires the address of a packet to which a virtual method to be called belongs from the packet information address list according to the identifier of the packet to which the virtual method to be called belongs, acquires data corresponding to the address of the packet to which the virtual method to be called belongs to obtain packet information to which the virtual method to be called belongs, and analyzes the packet information to which the virtual method to be called belongs according to the data structure of the packet information to obtain constant pool component information of the packet to which the virtual method to be called belongs;
for example: the identifier of the packet to which the virtual method to be called belongs is specifically as follows: 05, carrying out a reaction;
the addresses of the packet information address list are specifically: 000257 be;
the packet information address list specifically includes: 00010000// packet 0 address
00012000// packet 1 address
00013000// packet 2 address
00024000// packet 3 address
00025000// packet 4 address
000257 d 2// packet 5 Address
……;
The address of the packet to which the virtual method to be called belongs is specifically: 000257 d 2;
the packet information to which the virtual method to be called belongs is specifically: 000002500000002400004 c 00000000980000645 c 000001 f 300008800000001 ed 000089 a 400000118;
the constant pool component information of the package to which the virtual method to be called belongs is specifically as follows: 000089 a 400000118;
step A2: the Java card analyzes the constant pool component information of the packet to which the virtual method to be called belongs to obtain a constant pool address, obtains data corresponding to the constant pool address to obtain a constant pool component, and obtains the virtual method to be called in the constant pool component by taking an instruction operand as an index;
optionally, in this embodiment, the parsing, by the Java card, the constant pool component information of the packet to which the virtual method to be called belongs to obtain a constant pool address specifically includes: the Java card acquires data on the first four bytes from the constant pool component information of the packet to which the virtual method to be called belongs to obtain a constant pool address;
for example: the constant pool address is specifically: 000089 a 4;
the constant cell component specifically comprises: 03800302038003070380030803800306048003060480030704800308048003060580040605800407058004080680040606800506068005070680050806800506, respectively;
the called virtual method specifically comprises the following steps: 03800302, respectively;
step 302: the Java card obtains the reference of the class to which the virtual method to be called currently belongs and the index of the virtual method to be called from the virtual method to be called, and determines the address of the class to which the virtual method to be called currently belongs according to the reference of the class to which the virtual method to be called currently belongs;
optionally, in this embodiment, step 302 specifically includes:
step C1: the Java card acquires data on the last byte from the virtual method to be called to obtain the index of the virtual method to be called, acquires the reference of the class to which the virtual method to be called currently belongs from the class to which the virtual method to be called currently belongs, judges whether the highest bit of the reference of the class to which the virtual method to be called currently belongs is a second preset value or not, if so, executes the step C2, otherwise, executes the step C3;
optionally, in this embodiment, each virtual method has a length of 4 bytes, where the first byte is an instance tag of the virtual method, the second byte and the third byte are references of a class to which the virtual method belongs, and the fourth byte is an index of the virtual method, where the instance tag of the virtual method is used to indicate a type of an instance of the virtual method;
correspondingly, the Java card obtains the reference of the class to which the virtual method to be called currently belongs from the virtual method to be called, specifically: the Java card acquires data on a second byte and a third byte from the virtual method to be called to obtain the reference of the class to which the virtual method to be called belongs;
optionally, in this embodiment, the second preset value is specifically 1;
for example, in this embodiment, the reference of the class to which the virtual method to be called currently belongs is specifically: 8003, its highest bit is 1;
step C2: the method comprises the steps that a Java card obtains the quote of a parent class of a class to which a virtual method to be called currently belongs from the class to which the virtual method to be called currently belongs, respectively obtains the index of the class to which the virtual method to be called currently belongs and the index of a package to which the virtual method to be called belongs from the quote of the parent class of the class to which the virtual method to be called currently belongs, obtains a corresponding export table according to the index of the package to which the virtual method to be called belongs, and obtains the address of the class to which the virtual method to be called currently belongs in the export table according to the index of the class to which the virtual method to be called currently belongs;
optionally, in this embodiment, the length of the reference of the class to which one virtual method belongs is two bytes, that is, the reference includes 16 bits, where the 0 th bit to the 7 th bit are indexes of the class to which the virtual method belongs and are lower bytes, the 8 th bit to the 14 th bit are indexes of the packet to which the virtual method belongs and are upper bytes, and the 15 th bit is the highest byte;
optionally, in this embodiment, the obtaining, by the Java card, the index of the class to which the virtual method to be called currently belongs and the index of the package to which the virtual method to be called belongs from the reference of the parent class of the class to which the virtual method to be called currently belongs by the Java card respectively specifically includes: the Java card acquires the 0 th bit to the 7 th bit from the reference of the parent class of the class to which the virtual method to be called currently belongs to obtain the index of the class to which the virtual method to be called currently belongs, and acquires the 8 th bit to the 14 th bit to obtain the index of the packet to which the virtual method to be called belongs;
for example, in this embodiment, the index of the class to which the virtual method to be called currently belongs is specifically: 03, the index of the packet to which the virtual method to be called belongs is specifically: 00;
optionally, in this embodiment, the obtaining of the corresponding export table according to the index of the packet to which the virtual method to be called belongs specifically includes: the Java card acquires a corresponding export table address from a prestored export table address array according to the index of the packet to which the virtual method to be called belongs, and acquires an export table corresponding to the index of the packet to which the virtual method to be called belongs according to the export table address;
for example, in this embodiment, the index of the packet to which the virtual method to be called belongs is specifically: 00;
the export table address array is specifically:
00 00 1A 87
00 00 1E 06
00 00 20 32
00 00 22 87
00 00 43 02
00 00 45 34;
the derived table address is specifically: 00001A 87;
the derivation table specifically includes:
......
0A
01 07 //size
0D //class_count
// 0 th
00 E2 //class_offset
00 01 //static_field_count
00 01 //static_method_count
// 1 st
01 D2 //class_offset
00 02 //static_field_count
00 03 //static_method_count
// 2 nd
01 FE //class_offset
00 0A //static_field_count
00 03 //static_method_count
// 3 rd
03 02 //class_offset
00 03 //static_field_count
00 08 //static_method_count
......
For example, in this embodiment, the index of the class to which the virtual method to be called currently belongs is 03, and the address offset of the class to which the virtual method to be called currently belongs can be found in the derivation table by using 03 as the index, which is 0302;
step C3: the Java card acquires the base address of the class component of the packet to which the virtual method to be called belongs from the packet information to which the virtual method to be called belongs, and obtains the address of the class to which the virtual method to be called currently belongs according to the base address of the class component of the packet to which the virtual method to be called belongs and the address offset of the class to which the virtual method to be called currently belongs;
optionally, in this embodiment, the obtaining, according to the base address of the class component of the packet to which the virtual method to be called belongs and the address offset of the class to which the virtual method to be called currently belongs, the address of the class to which the virtual method to be called currently belongs specifically includes: the method comprises the steps that a Java card obtains a base address of a class component of a packet to which a virtual method to be called belongs from packet information to which the virtual method to be called belongs, the base address of the class component of the packet to which the virtual method to be called belongs and the address offset of the class to which the virtual method to be called currently belongs are added to obtain a first operation value, and the first operation value is used as the address of the class to which the virtual method to be called currently belongs;
for example: the base address of the class component of the packet to which the virtual method to be called belongs is specifically: 00000250, the address of the class to which the virtual method to be called currently belongs is specifically: 00000552, respectively;
step 303: the Java card acquires object reference from a virtual machine running stack, and acquires object data in a stored object table by taking the object reference as an index;
optionally, in this embodiment, the obtaining, by the Java card, the object reference from the virtual machine runtime stack specifically includes: the Java card acquires a stored stack pointer, acquires data pointed by the stack pointer by taking the stack pointer as an address, and acquires data on the first two bytes from the data pointed by the stack pointer to obtain object reference;
for example, in this embodiment, the data pointed by the stack pointer is 008f 00030000 fc 100001, and the object reference is: 008 f;
optionally, in this embodiment, the obtaining object data in the stored object table by using the object reference as an index specifically includes:
step B1: the Java card acquires a base address of the object data, an initial number of the object data and a maximum length of an address of the object data, subtracts the reference of the object and the initial number of the object data to obtain a second operation value, multiplies the second operation value and the maximum length of the address of the object data to obtain a third operation value, and adds the third operation value and the base address of the object data to obtain the address of the object data;
for example, in this embodiment, the base address of the object data is specifically: 00200000, respectively;
the initial number of the object data is specifically: 0080;
the maximum length of the object data address is specifically: 4;
the object reference specifically includes: 008f
The address of the obtained object data is specifically: 0x 0020003C;
step B2: the Java card acquires data corresponding to the address of the object data to obtain the object data;
for example, in this embodiment, the object data is specifically: 20010C 0143180000 fc 10 a 10000000 a 1b 00082 d 0581000000001 b 00022 d 1591000000001 b 00852 d 1720000001 f 505 fc 0d 008f 00000000000000000000000000000000000020000000 b 20581000000001 b 00022 d 9C 28000000 fe 07 fc 0C 81000000001 b 00022 d 9e 280000028 a 05 fc 0b 8100;
step 304: the Java card acquires the identification of the package to which the actual class of the object belongs and the reference of the actual class of the object from the object data, and obtains the address of the actual class of the object according to the identification of the package to which the actual class of the object belongs and the reference of the actual class of the object;
optionally, in this embodiment, the obtaining, by the Java card, the identifier of the package to which the actual object class belongs and the reference of the actual object class from the object data specifically include: the Java card acquires data on a fourth byte from the object data to obtain an identifier of a packet to which the actual class of the object belongs, and acquires data on a second byte and a third byte to obtain a reference of the actual class of the object;
for example, in this embodiment, the identifier of the package to which the actual class of the object belongs is specifically: 01;
the reference of the actual class of the object is specifically as follows: 010C;
optionally, in this embodiment, obtaining the address of the actual object class according to the identifier of the packet to which the actual object class belongs and the reference of the actual object class specifically includes:
step D1: the Java card takes the identifier of the packet to which the object actual class belongs as an index to acquire packet address information to which the object actual class belongs in a packet information address list, acquires data corresponding to the packet address information to which the object actual class belongs to obtain packet information to which the object actual class belongs, and acquires data on the first four bytes from the packet information to which the object actual class belongs to obtain the initial address of a class component of the packet to which the object actual class belongs;
for example, in this embodiment, the address information of the packet to which the actual class of the object belongs is specifically: 00012000;
the package information to which the actual class of the object belongs is specifically: 000062120000123 b 000062640000128 d 000062 b 6000012 df 00006308000013310000635 a 00001383;
the starting address of the class component of the packet to which the actual class of the object belongs is specifically: 00006212, respectively;
step D2: the Java card adds the initial address of the class component of the packet to which the actual class of the object belongs and the reference of the actual class of the object to obtain the address of the actual class of the object;
for example, in this embodiment, the address of the actual class of the object is specifically: 0000631E;
step 305: judging whether the address of the current class of the virtual method to be called is the same as the address of the actual class of the object by the Java card, if so, executing step 312, otherwise, executing step 306;
for example, in this embodiment, the address of the class to which the virtual method to be called currently belongs is specifically: 00000552, the address of the actual class of the object is specifically: 0000631E, both of which are different, performing step 306;
step 306: the Java card establishes a linked list according to the address of the class to which the virtual method to be called currently belongs and the address of the actual class of the object;
specifically, in this embodiment, step 306 specifically includes:
step M1: establishing a linked list by the Java card;
step M2: adding the address of the actual class of the object into a linked list by the Java card;
step M3: judging whether the address of the current class of the virtual method to be called is the same as the address of the actual class of the object by the Java card, if so, finishing the establishment of the linked list, otherwise, executing the step M4;
step M4: the Java card sets the address of the object actual class as the address of the parent class of the object actual class, and returns to the step M2;
optionally, in this embodiment, the head of the linked list is an address of a class to which the virtual method to be called currently belongs, the tail of the linked list is an address of an object actual class, and each node in the linked list represents an address of a class;
for example, in this embodiment, the linked list specifically includes:
06 00 00 01 00 00 80 00 00 FF 00
01 /*base*/
04 /*count*/
00 08
00 0C
00 10
00 15
00 FF FF/already created VMMT/
03
06 80 03 02 00 00 80 00 00 FF 00
03 /*base*/
04 /*count*/
00 10
00 15
00 1A
00 2C
0001020304 FF/created VMMT
04
In this example, the actual class of the object is a direct subclass of the class to which the virtual method to be called currently belongs, and therefore, only two items, namely the address of the actual class of the object and the address of the class to which the virtual method to be called currently belongs, are included in the linked list;
step 307: judging whether the address of the direct subclass of the class to which the virtual method to be called currently belongs exists in the linked list or not by the Java card according to the address of the class to which the virtual method to be called currently belongs, if so, executing step 308, otherwise, executing step 310;
optionally, in this embodiment, the determining, by the Java card, whether an address of a direct subclass of a class to which the virtual method to be called currently belongs exists in the linked list according to an address of the class to which the virtual method to be called currently belongs specifically includes: the Java card searches a node where the class to which the virtual method to be called currently belongs in the linked list according to the address of the class to which the virtual method to be called currently belongs, judges whether the node exists behind the node where the class to which the virtual method to be called currently belongs, if so, judges that the address of the direct subclass of the class to which the virtual method to be called currently belongs exists in the linked list, and otherwise, judges that the address of the direct subclass of the class to which the virtual method to be called currently belongs does not exist in the linked list;
for example, in this embodiment, the class to which the virtual method to be called currently belongs has a direct subclass, and the direct subclass is the actual class of the object, and step 308 is executed;
step 308: the Java card acquires the direct subclass of the class to which the virtual method to be called currently belongs according to the address of the direct subclass of the class to which the virtual method to be called currently belongs, searches an index of the virtual method to be called in a virtual method mapping table of the direct subclass of the class to which the virtual method to be called currently belongs, judges whether the index is found, if so, executes step 309, otherwise, executes step 310;
optionally, in this embodiment, before the step 308, the method further includes: the Java card acquires the number of the virtual methods of the class to which the virtual method to be called belongs and the initial number of the virtual methods of the class to which the virtual method to be called belongs from the class to which the virtual method to be called currently belongs and stores the initial number;
for example, in this embodiment, the index of the virtual method to be called specifically includes: 02, the virtual method mapping table of the direct subclass is 0001020304 FF, the index 02 of the virtual method to be called can be found, and step 309 is executed;
step 309: the Java card sets the address of the direct subclass of the class to which the virtual method to be called currently belongs as the address of the class to which the virtual method to be called currently belongs, sets the index of the class to which the virtual method to be called currently belongs in the virtual method mapping table of the direct subclass of the class to which the virtual method to be called currently belongs as the index of the class to which the virtual method to be called currently belongs, and returns to step 307;
for example, in this embodiment, after returning to step 307, there is no direct subclass in the class to which the virtual method to be called currently belongs, and step 310 is executed;
step 310: searching the index of the virtual method to be called in the virtual method table of the class to which the virtual method to be called currently belongs by the Java card, judging whether the index is searched, if so, executing step 312, otherwise, executing step 311;
optionally, in this embodiment, step 310 specifically includes: the Java card obtains a fourth operation value according to the number of the virtual methods of the class to which the virtual method to be called belongs and the initial number of the virtual method of the class to which the virtual method to be called belongs, judges whether the index of the virtual method to be called is greater than or equal to the initial number of the virtual method of the class to which the virtual method to be called belongs and less than the fourth operation value, if so, executes step 312, otherwise, executes step 311;
optionally, in this embodiment, the Java card obtains the fourth operation value according to the number of virtual methods of the class to which the virtual method to be called belongs and the start number of the virtual method of the class to which the virtual method to be called belongs, specifically: the Java card adds the number of the virtual methods of the class to which the virtual method to be called belongs and the initial number of the virtual method of the class to which the virtual method to be called belongs to obtain a fourth operation value;
for example, in this embodiment, the number of virtual methods of the class to which the virtual method to be called belongs is specifically: 07, the initial number of the virtual method of the class to which the virtual method to be called belongs is specifically: 03, the index of the virtual method to be called is specifically: 02, the fourth operation value is specifically: 10, in this embodiment, the index 02 of the virtual method to be called is not between 03 and 10, and step 311 is executed;
step 311: the Java card obtains the reference of the parent class of the class to which the virtual method to be called currently belongs from the class to which the virtual method to be called currently belongs, determines the address of the class to which the virtual method to be called currently belongs according to the reference of the parent class of the class to which the virtual method to be called currently belongs, and returns to the step 310;
optionally, in this embodiment, step 311 specifically includes:
step N1: the Java card acquires the reference of the parent class of the class to which the virtual method to be called currently belongs from the class to which the virtual method to be called currently belongs, judges whether the highest bit of the reference of the parent class of the class to which the virtual method to be called currently belongs is a second preset value, if so, executes the step N2, otherwise, executes the step N3;
optionally, in this embodiment, the second preset value is specifically 1;
for example, in this embodiment, the reference to the parent class of the class to which the virtual method to be called currently belongs is specifically: 8003;
step N2: the method comprises the steps that a Java card obtains an index of a parent class of a class to which a virtual method to be called currently belongs and an index of a packet to which the parent class of the class to which the virtual method to be called currently belongs from a reference of the parent class of the class to which the virtual method to be called currently belongs, the indexes are respectively used as the index of the class to which the virtual method to be called currently belongs and the index of the packet to which the virtual method to be called belongs, a corresponding export table is obtained according to the index of the packet to which the virtual method to be called currently belongs, and the address of the class to which the virtual method to be called currently belongs is obtained in the export table according to the index of the class to which the virtual method to be called currently belongs;
optionally, in this embodiment, the Java card obtains, from the reference of the parent class of the class to which the virtual method to be called currently belongs, an index of the parent class of the class to which the virtual method to be called currently belongs and an index of the package to which the parent class of the class to which the virtual method to be called currently belongs, and respectively serve as the index of the class to which the virtual method to be called currently belongs and the index of the package to which the virtual method to be called belongs, specifically: the 0 th bit to the 7 th bit obtained by the Java card from the reference of the parent class of the class to which the virtual method to be called currently belongs are used as the indexes of the class to which the virtual method to be called currently belongs, the 8 th bit to the 14 th bit are obtained as the indexes of the packet to which the virtual method to be called belongs, and the step 310 is returned;
step N3: the Java card obtains the base address of the class component of the packet to which the virtual method to be called belongs from the packet information to which the virtual method to be called belongs, obtains the address of the class to which the virtual method to be called currently belongs according to the base address of the class component of the packet to which the virtual method to be called belongs and the address offset of the class to which the virtual method to be called currently belongs, and returns to the step 310;
for example, in this embodiment, after returning to step 310, the number of virtual methods of the current class in which the virtual method to be called is located is specifically: 04, the initial number of the virtual method in the virtual method mapping table where the virtual method to be called is located is specifically: 01, the index of the virtual method to be called is specifically: 02, the fourth operation value is specifically: 05, in this embodiment, the index 02 of the virtual method to be called is between 01 and 05, and step 312 is executed;
step 312: and the Java card acquires the address of the actual called virtual method from the virtual method of the class to which the virtual method to be called currently belongs according to the index of the virtual method to be called.
Optionally, in this embodiment, step 312 specifically includes: and the Java card performs subtraction operation according to the index of the virtual method to be called and the initial number of the virtual method of the class to which the virtual method to be called belongs to obtain a fifth operation value, and the address of the actual called virtual method is obtained in the virtual method table of the class to which the virtual method to be called currently belongs by taking the fifth operation value as the index.
For example, in this embodiment, the index of the called virtual method specifically includes: 02, the initial number of the virtual method of the class to which the virtual method to be called belongs is specifically as follows: 01, the fifth operation value is specifically: 01;
the virtual method table of the class to which the virtual method to be called currently belongs is specifically as follows:
06 00 00 01 00 00 80 00 00 FF 00
01 /*base*/
04 /*count*/
0008// 0 th
000C// 1 st
0010// 2 nd
0015// 3 rd
00 FF FF/already created VMMT/
The called virtual method specifically comprises the following steps: 000C;
the embodiment provides a virtual method calling method, which indexes virtual methods in an original application and a new application through a virtual method mapping table, and after an application file package to which a parent class belongs is upgraded, the application file package to which a child class belongs can still normally run without regenerating Java byte codes, so that the virtual method mapping table can serve the original application and the new application, and the expansibility of an API (application programming interface) of a Java card is improved.
The present invention also provides an electronic device, as shown in fig. 4, which shows a schematic structural diagram of an electronic device (e.g., the Java card in fig. 1) 400 suitable for implementing embodiments of the present application. The devices in the embodiments of the present application may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 4, the apparatus 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage device 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 300 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the device 400 to communicate with other devices, either wirelessly or by wire, to exchange data. While fig. 4 illustrates an apparatus 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program, when executed by the processing device 401, performs the above-described functions defined in the methods of the embodiments of the present application.
It should be noted that the computer readable medium mentioned above in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the apparatus; or may be separate and not incorporated into the device.
The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to perform the method for calling the virtual method in the above embodiments.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The electronic device provided by the application is applicable to any embodiment of the virtual method calling method of the application, and details are not repeated here.
The invention provides electronic equipment, which indexes virtual methods in original application and new application through a virtual method mapping table, and can ensure that the application file packet belonging to a subclass can still normally run without regenerating Java byte codes after the application file packet belonging to a parent class is upgraded, so that the virtual method mapping table can serve the original application and the new application, and the expansibility of an API (application program interface) of a Java card is improved.
The present application provides a computer-readable storage medium storing computer instructions for causing a computer to execute the method for calling a virtual method shown in the above-described embodiments.
The computer-readable storage medium provided in the present application is applicable to any of the embodiments of the virtual method for calling, and is not described herein again.
The present application provides a computer program product which, when run on a computer, causes the computer to execute the calling method of the virtual method in the present application.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all such changes or substitutions should be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (15)

1. A virtual method calling method is suitable for a Java card and is characterized by comprising the following steps:
step 101: the method comprises the steps that a Java card obtains a virtual method to be called in a constant pool according to a virtual method calling instruction, obtains reference of a class to which the virtual method to be called currently belongs and an index of the virtual method to be called from the virtual method to be called, and determines an address of the class to which the virtual method to be called currently belongs according to the reference of the class to which the virtual method to be called currently belongs;
step 102: the Java card acquires object reference from a virtual machine running stack, acquires object data from a stored object table by taking the object reference as an index, acquires the identifier of a packet to which an object actual class belongs and the reference of the object actual class from the object data, and acquires the address of the object actual class according to the identifier of the packet to which the object actual class belongs and the reference of the object actual class;
step 103: the Java card judges whether the address of the current class of the virtual method to be called is the same as the address of the actual class of the object, if so, step 109 is executed, otherwise, a linked list is established according to the address of the current class of the virtual method to be called and the address of the actual class of the object, and step 104 is executed;
step 104: the Java card judges whether the linked list has the address of the direct subclass of the class to which the virtual method to be called currently belongs, if so, the step 105 is executed, otherwise, the step 107 is executed;
step 105: the Java card judges whether an index of the virtual method to be called exists in a virtual method mapping table of a direct subclass of a class to which the virtual method to be called currently belongs, if so, step 106 is executed, otherwise, step 107 is executed;
step 106: the Java card sets the address of the class to which the virtual method to be called currently belongs as the address of the direct subclass of the class to which the virtual method to be called currently belongs, sets the index of the virtual method to be called as the index of the virtual method to be called in the virtual method mapping table of the direct subclass of the class to which the virtual method to be called currently belongs, and returns to the step 104;
step 107: the Java card judges whether an index of the virtual method to be called exists in a virtual method table of a class to which the virtual method to be called currently belongs, if so, step 109 is executed, otherwise, step 108 is executed;
step 108: the Java card acquires the reference of the parent class of the class to which the virtual method to be called currently belongs from the class to which the virtual method to be called currently belongs, determines the address of the class to which the virtual method to be called currently belongs according to the reference of the parent class of the class to which the virtual method to be called currently belongs, acquires the class to which the virtual method to be called currently belongs according to the address of the class to which the virtual method to be called currently belongs, and returns to the step 107;
step 109: the Java card acquires the address of the actual called virtual method from the virtual method table of the class to which the virtual method to be called currently belongs according to the index of the virtual method to be called;
the virtual method mapping table comprises an index of a virtual method inherited by the class to which the virtual method mapping table belongs from a parent class of the class to which the virtual method mapping table belongs, and further comprises an index of a virtual method included in the class to which the virtual method mapping table belongs.
2. The method according to claim 1, wherein the Java card obtains the virtual method to be called in the constant pool according to the virtual method call instruction, specifically: and the Java card acquires an instruction operand from the virtual method calling instruction, and acquires the virtual method to be called in a constant pool by taking the instruction operand as an index.
3. The method of claim 2, wherein said obtaining the virtual method to be called in the constant pool indexed by the instruction operand comprises:
step A1: the Java card acquires an address of a packet information address list and an identifier of a packet to which a virtual method to be called belongs from a global variable of a memory, and acquires constant pool component information of the packet to which the virtual method to be called belongs according to the address of the packet information address list and the identifier of the packet to which the virtual method to be called belongs;
step A2: and the Java card analyzes the constant pool component information of the packet to which the virtual method to be called belongs to obtain a constant pool address, acquires data corresponding to the constant pool address to obtain a constant pool component, and acquires the virtual method to be called in the constant pool component by taking the instruction operand as an index.
4. The method according to claim 1, wherein the obtaining, from the virtual method to be called, a reference of a class to which the virtual method to be called currently belongs and an index of the virtual method to be called, and determining, according to the reference of the class to which the virtual method to be called currently belongs, an address of the class to which the virtual method to be called currently belongs specifically includes:
step C1: the Java card acquires data on the last byte from the virtual method to be called to obtain the index of the virtual method to be called, acquires the reference of the class to which the virtual method to be called currently belongs from the class to which the virtual method to be called currently belongs, judges whether the highest bit of the reference of the class to which the virtual method to be called currently belongs is a second preset value, if so, executes the step C2, otherwise, executes the step C3;
step C2: the Java card acquires the reference of the parent class of the class to which the virtual method to be called currently belongs from the class to which the virtual method to be called currently belongs, acquires the index of the class to which the virtual method to be called currently belongs and the index of the packet to which the virtual method to be called belongs from the reference of the parent class of the class to which the virtual method to be called currently belongs, acquires a corresponding export table according to the index of the packet to which the virtual method to be called belongs, and acquires the address of the class to which the virtual method to be called currently belongs in the export table according to the index of the class to which the virtual method to be called currently belongs;
step C3: the Java card acquires the base address of the class component of the packet to which the virtual method to be called belongs from the packet information to which the virtual method to be called belongs, and obtains the address of the class to which the virtual method to be called currently belongs according to the base address of the class component of the packet to which the virtual method to be called belongs and the address offset of the class to which the virtual method to be called currently belongs.
5. The method according to claim 1, wherein the obtaining object data in the saved object table using the object reference as an index specifically comprises:
step B1: the Java card acquires a base address of object data, an initial number of the object data and a maximum length of an address of the object data, performs subtraction operation on the object reference and the initial number of the object data to obtain a second operation value, performs multiplication operation on the second operation value and the maximum length of the address of the object data to obtain a third operation value, and performs addition operation on the third operation value and the base address of the object data to obtain the address of the object data;
step B2: and the Java card acquires data corresponding to the address of the object data to obtain the object data.
6. The method according to claim 1, wherein obtaining the address of the actual class of the object according to the identifier of the package to which the actual class of the object belongs and the reference of the actual class of the object specifically comprises:
step D1: the Java card takes the identifier of the packet to which the object actual class belongs as an index to acquire packet address information to which the object actual class belongs in a packet information address list, acquires data corresponding to the packet address information to which the object actual class belongs to acquire packet information to which the object actual class belongs, and acquires data on the first four bytes from the packet information to which the object actual class belongs to acquire the starting address of a class component of the packet to which the object actual class belongs;
step D2: and the Java card adds the initial address of the class component of the package to which the actual object class belongs and the reference of the actual object class to obtain the address of the actual object class.
7. The method according to claim 1, wherein the establishing of the linked list according to the address of the class to which the virtual method to be called currently belongs and the address of the object actual class specifically includes:
step M1: the Java card establishes a linked list;
step M2: the Java card adds the address of the actual class of the object to the linked list;
step M3: the Java card judges whether the address of the current class of the virtual method to be called is the same as the address of the actual class of the object, if so, the establishment of a linked list is completed, otherwise, the step M4 is executed;
step M4: and the Java card sets the address of the object actual class as the address of the parent class of the object actual class, and returns to the step M2.
8. The method according to claim 7, wherein the Java card determines whether an address of a direct subclass of a class to which the virtual method to be called currently belongs exists in the linked list, specifically: and the Java card searches a node where the virtual method to be called currently belongs in the linked list according to the address of the class to which the virtual method to be called currently belongs, judges whether a node exists behind the node where the virtual method to be called currently belongs, judges whether a direct subclass exists in the class to which the virtual method to be called currently belongs if the node exists, and judges that the direct subclass does not exist in the class to which the virtual method to be called currently belongs if the node exists behind the node.
9. The method of claim 1, wherein step 105 is preceded by: and the Java card acquires the number of the virtual methods of the class to which the virtual method to be called belongs and the initial numbers of the virtual methods of the class to which the virtual method to be called belongs from the class to which the virtual method to be called currently belongs and stores the numbers.
10. The method according to claim 9, wherein the determining, by the Java card, whether an index of the virtual method to be called exists in a virtual method table of a class to which the virtual method to be called currently belongs includes: and the Java card obtains a fourth operation value according to the number of the virtual methods of the class to which the virtual method to be called belongs and the initial number of the virtual method of the class to which the virtual method to be called belongs, judges whether the index of the virtual method to be called is greater than or equal to the initial number of the virtual method of the class to which the virtual method to be called belongs and less than the fourth operation value, judges that the index of the virtual method to be called exists in the virtual method table of the class to which the virtual method to be called currently belongs if the index of the virtual method to be called does not exist in the virtual method table of the class to which the virtual method to be called currently belongs if the index of the virtual method to be called currently exists in the class.
11. The method according to claim 9, wherein the step 109 is specifically: and the Java card performs subtraction operation according to the index of the virtual method to be called and the initial number of the virtual method of the class to which the virtual method to be called belongs to obtain a fifth operation value, and the address of the actual called virtual method is obtained in the virtual method table of the class to which the virtual method to be called currently belongs by taking the fifth operation value as the index.
12. The method of claim 1, wherein the step 108 specifically comprises:
step N1: the Java card acquires the reference of the parent class of the class to which the virtual method to be called currently belongs from the class to which the virtual method to be called currently belongs, judges whether the highest position of the reference of the parent class of the class to which the virtual method to be called currently belongs is a second preset value, if so, executes the step N2, otherwise, executes the step N3;
step N2: the Java card obtains the index of the parent class of the class to which the virtual method to be called currently belongs and the index of the packet to which the parent class of the class to which the virtual method to be called currently belongs from the reference of the parent class of the class to which the virtual method to be called currently belongs, and respectively serves as the index of the class to which the virtual method to be called currently belongs and the index of the packet to which the virtual method to be called belongs, obtains a corresponding export table according to the index of the packet to which the virtual method to be called currently belongs, obtains the address of the class to which the virtual method to be called currently belongs in the export table according to the index of the class to which the virtual method to be called currently belongs, and returns to step 107;
step N3: the Java card obtains the base address of the class component of the packet to which the virtual method to be called belongs from the packet information to which the virtual method to be called belongs, obtains the address of the class to which the virtual method to be called currently belongs according to the base address of the class component of the packet to which the virtual method to be called belongs and the address offset of the class to which the virtual method to be called currently belongs, and returns to step 107.
13. The method of claim 1, further comprising a generation process of the virtual method mapping table, comprising the steps of:
step S1: the conversion tool acquires a class from the class component and records the class as a current class, and acquires the initial number of the virtual method of the current class and the number of the virtual methods of the current class from the current class;
step S2: the conversion tool creates a virtual method mapping table of the current class according to the initial number of the virtual method of the current class and the number of the virtual methods of the current class, and initializes the virtual method mapping table of the current class;
step S3: the conversion tool acquires the reference of the parent class of the current class from the current class, judges whether the highest bit of the reference of the parent class of the current class is a second preset value or not, if so, executes step S4, otherwise, executes step S5;
step S4: the conversion tool respectively obtains the index of the parent class of the current class and the index of the packet to which the parent class of the current class belongs from the reference of the parent class of the current class, obtains a pre-stored export table address, obtains the parent class of the current class according to the index of the packet to which the parent class of the current class belongs and the export table address, and executes the step S6;
step S5: the conversion tool obtains a base address of a class component of a pre-stored package to which the current class belongs, obtains a parent class of the current class according to the base address of the class component of the package to which the current class belongs and the reference of the parent class of the current class, and executes step S6;
step S6: the conversion tool acquires the initial number of the virtual method of the parent class of the current class and the number of the virtual methods of the parent class of the current class from the parent class of the current class, and updates the virtual method mapping table of the current class according to the initial number of the virtual method of the parent class of the current class and the number of the virtual methods of the parent class of the current class;
step S7: and the conversion tool adds the virtual method mapping table of the current class to obtain the current class containing the virtual method mapping table.
14. An electronic device, comprising: a processor and a memory;
the memory for storing a computer program;
the processor to execute the computer program stored by the memory to perform the method of any of claims 1-13.
15. A computer-readable storage medium for storing a computer program which, when run on a computer, causes the computer to perform the method of any one of claims 1-13.
CN202110878229.5A 2021-08-02 2021-08-02 Virtual method calling method, electronic equipment and computer readable storage medium Active CN113326041B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110878229.5A CN113326041B (en) 2021-08-02 2021-08-02 Virtual method calling method, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110878229.5A CN113326041B (en) 2021-08-02 2021-08-02 Virtual method calling method, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113326041A CN113326041A (en) 2021-08-31
CN113326041B true CN113326041B (en) 2021-11-02

Family

ID=77426582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110878229.5A Active CN113326041B (en) 2021-08-02 2021-08-02 Virtual method calling method, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113326041B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093142A (en) * 2012-12-26 2013-05-08 飞天诚信科技股份有限公司 Java card object access control method
CN103559073A (en) * 2013-10-28 2014-02-05 飞天诚信科技股份有限公司 Data management method based on Java card
CN103914326A (en) * 2014-04-21 2014-07-09 飞天诚信科技股份有限公司 Method and device for efficiently updating JAVA instruction
CN105183571A (en) * 2015-09-22 2015-12-23 小米科技有限责任公司 Function calling method and device
CN111273968A (en) * 2020-01-17 2020-06-12 上海米哈游天命科技有限公司 Object calling method, device, equipment and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8307350B2 (en) * 2009-01-14 2012-11-06 Microsoft Corporation Multi level virtual function tables

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093142A (en) * 2012-12-26 2013-05-08 飞天诚信科技股份有限公司 Java card object access control method
CN103559073A (en) * 2013-10-28 2014-02-05 飞天诚信科技股份有限公司 Data management method based on Java card
CN103914326A (en) * 2014-04-21 2014-07-09 飞天诚信科技股份有限公司 Method and device for efficiently updating JAVA instruction
CN105183571A (en) * 2015-09-22 2015-12-23 小米科技有限责任公司 Function calling method and device
CN111273968A (en) * 2020-01-17 2020-06-12 上海米哈游天命科技有限公司 Object calling method, device, equipment and medium

Also Published As

Publication number Publication date
CN113326041A (en) 2021-08-31

Similar Documents

Publication Publication Date Title
CN104268472B (en) Reduction is by the method and apparatus of third party's dynamic base Modification growth function address
CN112817657B (en) Application program starting item loading method, device, system and storage medium
CN111813465B (en) Information acquisition method, device, medium and equipment
CN110704833A (en) Data permission configuration method, device, electronic device and storage medium
CN111191171A (en) Multi-Fragment loading method and device based on android and electronic equipment
CN110609687A (en) Compiling method, device, electronic equipment and storage medium
CN109033456B (en) Condition query method and device, electronic equipment and storage medium
CN111078228A (en) Method and device for converting webpage into small program, server and storage medium
CN112416303B (en) Software development kit hot repair method and device and electronic equipment
CN111694992A (en) Data processing method and device
CN111324258B (en) Method, device, equipment and medium for generating contents of configuration items of multilevel pull-down menu
CN113326041B (en) Virtual method calling method, electronic equipment and computer readable storage medium
CN110489563B (en) Method, device, equipment and computer readable storage medium for representing graph structure
CN112148826A (en) Method, device, equipment and storage medium for integrating map service in business
CN109814778B (en) Method and device for realizing small program tab, electronic equipment and medium
CN111796865B (en) Byte code file modification method, device, terminal equipment and medium
CN105354506A (en) File hiding method and apparatus
CN111274513B (en) Window display method, device, terminal and storage medium
US8775936B2 (en) Displaying dynamic and shareable help data for images a distance from a pointed-to location
CN112764802A (en) Business logic customization method and device, electronic equipment and storage medium
CN111274551A (en) Compiler-based java code protection method and device and electronic equipment
CN112068814A (en) Method, device, system and medium for generating executable file
CN113032808B (en) Data processing method and device, readable medium and electronic equipment
CN112559394B (en) System library access method and device and electronic equipment
CN113553040B (en) Registration realization method, device, equipment and medium for visible and spoken identification function

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant