Unlock instant, AI-driven research and patent intelligence for your innovation.

Information collection method, device and equipment of anonymous function and readable storage medium

An anonymous function and function information technology, which is applied in the field of anonymous function information acquisition method, equipment and readable storage medium, and devices, can solve the problems of unable to realize click monitoring interface, unable to directly identify and so on.

Pending Publication Date: 2021-06-22
TENCENT TECH (SHENZHEN) CO LTD
View PDF0 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, when it is necessary to implement the above-mentioned click-monitoring interface through Lambda expressions, because in the Lambda expression, the interface class name and function name are both unknown and cannot be directly identified, so the above-mentioned click-monitoring interface cannot be implemented

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Information collection method, device and equipment of anonymous function and readable storage medium
  • Information collection method, device and equipment of anonymous function and readable storage medium
  • Information collection method, device and equipment of anonymous function and readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0042] In order to make the purpose, technical solutions and advantages of the application clearer, the following will further describe the implementation of the application in detail in conjunction with the accompanying drawings.

[0043] First, a brief introduction to the nouns involved in this application:

[0044] Anonymous function: refers to a shorthand form of function definition in the programming process. In the process of using the anonymous function, there is no need to define the function name, and only need to confirm the assignment relationship or the triggering of the event to realize the anonymous function. application. Schematically, the anonymous function is in the form of: vara=function() {return 1}; the anonymous function does not define a function name, and assigns a value to the variable a. Since anonymous functions do not need to define function names, there is no function name conflict.

[0045] Lambda expression: also known as closure, is a way to wr...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an information collection method, device and equipment of an anonymous function and a readable storage medium, and relates to the field of program design. The method comprises the following steps: acquiring a byte code file, wherein the byte code file comprises a guide function and a byte code constant pool; function information of the anonymous function is obtained from the byte code constant pool, and a first corresponding relation between the constant pool index and the function information is obtained; obtaining a dynamic byte code instruction; interface information corresponding to the interface information descriptor is obtained from a byte code constant pool, and a second corresponding relation between the attribute table index and the interface information is obtained; and combining the first corresponding relationship with the second corresponding relationship to obtain information of the anonymous function. According to the method, function information is obtained from a byte code constant pool through a guide function, interface information is obtained from the byte code constant pool through a dynamic byte code instruction, and a corresponding relation is established between the function information and the interface information through a constant pool index and an attribute table index, so that context information of an anonymous function of a Lambda expression is obtained.

Description

technical field [0001] The embodiments of the present application relate to the field of program design, and in particular to an anonymous function information acquisition method, device, device, and readable storage medium. Background technique [0002] An anonymous function is a form of function that can be passed in without an explicit definition. The anonymous function contains an expression in the application process. In this expression, there is no need to define the name of the anonymous function, but directly use the anonymous A function expression assigns an anonymous function to a variable to realize the function of the anonymous function. Schematically, the anonymous function expression includes a Lambda expression. [0003] In related technologies, the interface for realizing click monitoring in Android development is taken as an example for illustration. Usually, the interface for clicking monitoring is implemented based on an anonymous inner class. The anonymou...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/41G06F16/22
CPCG06F8/434G06F16/2282
Inventor 姜凡
Owner TENCENT TECH (SHENZHEN) CO LTD