CN110007900A - Tool-class call method, system, computer equipment and storage medium - Google Patents

Tool-class call method, system, computer equipment and storage medium Download PDF

Info

Publication number
CN110007900A
CN110007900A CN201910113105.0A CN201910113105A CN110007900A CN 110007900 A CN110007900 A CN 110007900A CN 201910113105 A CN201910113105 A CN 201910113105A CN 110007900 A CN110007900 A CN 110007900A
Authority
CN
China
Prior art keywords
class
tool
information
developing instrument
function
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.)
Pending
Application number
CN201910113105.0A
Other languages
Chinese (zh)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910113105.0A priority Critical patent/CN110007900A/en
Publication of CN110007900A publication Critical patent/CN110007900A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Abstract

The present invention relates to exploitation auxiliary tool technology fields, the present invention provides a kind of tool-class call method, system, computer equipment and storage medium, the described method includes: the tool-class that identification software program file includes from software project file, obtains the definition information of tool-class;According to the Function Identification information for defining information acquisition instrument class;Information and Function Identification information preservation will be defined in developing instrument template;In processing software item file, the calls tool class from developing instrument template.Above-mentioned tool-class call method, the definition code of the tool-class dispersed in software project file can be incorporated into specified developing instrument template, convenient for the calls tool class in developing instrument template, reduction traverses and searches calls tool class after multiple files in software project file, improves the calling efficiency of tool-class.

Description

Tool-class call method, system, computer equipment and storage medium
Technical field
The present invention relates to exploitation auxiliary tool technology field, specifically, the present invention relates to a kind of tool-class call method, Tool-class calling system, computer equipment and storage medium.
Background technique
In the project in face of object programming, as project development is in progress, technical staff can continue to define various functions Tool-class.Since project is divided the work, tool-class can be scattered the software program file under project difference path with exploitation In.
When technical staff needs to call the tool-class of certain function, generally requires after being searched in multiple files and know The tool-class of definition judges whether there is the tool-class of the function, searches the tool-class of corresponding function and the time of complete call It is long, the calling low efficiency of tool-class.In addition, being realized due to can not quickly know developed tool-class between technical staff The tool-class of meeting while overlapping development identical function when identical function, the calling low efficiency of tool-class, technical staff also cause weight Multiple labour, increases cost.
Summary of the invention
The purpose of the present invention is intended at least can solve the calling low efficiency of above-mentioned one of technological deficiency, especially tool-class Technological deficiency.
The present invention provides a kind of tool-class call method, includes the following steps:
The tool-class that identification software program file includes from software project file obtains the definition letter of the tool-class Breath;
According to the Function Identification information for defining tool-class described in acquisition of information;
By the definition information and the Function Identification information preservation in developing instrument template;
When handling the software project file, the tool-class is called from the developing instrument template.
In one embodiment, the tool-class that identification software program file includes from software project file obtains The step of definition information of the tool-class, comprising:
The each software program file for traversing the software project file, in the program code of the software program file Identification facility class definition mark;The class name of tool-class described in marker extraction is defined according to the tool-class and for described in defining The program code of tool-class;Using the class name of the tool-class and the program code for being used to define the tool-class as the work Has the definition information of class.
In one embodiment, described according to the step of the Function Identification information for defining tool-class described in acquisition of information Suddenly, comprising:
Identify the annotation text defined in information;The function of marking instrument class function is extracted from the annotation text Identification information.
In one embodiment, described according to the step of the Function Identification information for defining tool-class described in acquisition of information Suddenly, comprising:
The method of calling of the tool-class is determined according to the definition information of the tool-class;It is determined according to the method for calling The call type of the tool-class;Using the call type of the tool-class as the Function Identification information.
In one embodiment, described by the definition information and the Function Identification information preservation in developing instrument mould Before step in plate, further includes:
According to the definition information of tool-class described in code writing rule detection, and obtain testing result;When the detection is tied When fruit is expressed as in the tool-class without markup information, to tool-class mark for reminding the prompt information of mark;Work as institute When stating testing result and being expressed as the definition information of the tool-class and can optimize, the tool-class is identified for reminding Optimized code Prompt information.
In one embodiment, described by the definition information and the Function Identification information preservation in developing instrument mould After step in plate, further includes:
Identify the tool-class increased newly in the software project file;The newly-increased tool-class is stored in the exploitation work Has template.
In one embodiment, described by the definition information and the Function Identification information preservation in developing instrument mould After step in plate, further includes:
Check that the developing instrument template whether there is the tool-class of identical function;It is removed from the developing instrument template Duplicate tool-class in the tool-class of the identical function.
In one embodiment, described by the definition information and the Function Identification information preservation in developing instrument mould After step in plate, further includes:
Obtain the calling situation in the software project file to the tool-class;In the calling situation of any one tool-class In call number when being zero, the prompt information for reminding never call is identified to the tool-class.
In one embodiment, it is adjusted from the developing instrument template described when handling the software project file Before the step of the tool-class, further includes:
Obtain term;The term is matched with definition information or Function Identification information, from the exploitation work Have in template and obtains and the matched tool-class of the term;Return to the matched tool-class.
The present invention also provides a kind of tool-class calling systems, comprising:
Tool-class identification module is obtained for the tool-class that identification software program file includes from software project file The definition information of the tool-class;
Function Identification obtains module, for according to the Function Identification information for defining tool-class described in acquisition of information;
Developing instrument template preserving module, for the definition information and the Function Identification information preservation to be developed work Have in template;
Tool-class calling module, for being called from the developing instrument template when handling the software project file The tool-class.
The present invention also provides a kind of computer equipment, including memory and processor, calculating is stored in the memory Machine readable instruction, when the computer-readable instruction is executed by the processor, so that the processor executes such as any implementation The step of example tool-class call method.
The present invention also provides a kind of storage mediums for being stored with computer-readable instruction, and the computer-readable instruction is by one When a or multiple processors execute, so that one or more processors execute the step of tool-class call method described in any embodiment Suddenly.
Above-mentioned tool-class call method, system and mobile terminal, the tool-class that can will disperse in software project file Definition code be incorporated into specified developing instrument template, convenient in developing instrument template calls tool class, reduce soft Calls tool class after multiple files is traversed and searched in part item file, improves the calling efficiency of tool-class.
The additional aspect of the present invention and advantage will be set forth in part in the description, these will become from the following description Obviously, or practice through the invention is recognized.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, in which:
Fig. 1 is the flow chart of tool-class call method in one embodiment;
Fig. 2 is the flow chart of tool-class call method in another embodiment;
Fig. 3 is the structural schematic diagram of tool-class calling system in one embodiment;
Fig. 4 is the schematic diagram of internal structure of computer equipment in one embodiment.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, and for explaining only the invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one It is a ", " described " and "the" may also comprise plural form.It is to be further understood that wording "and/or" used herein includes One or more associated wholes for listing item or any cell and all combination.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art Language and scientific term), there is meaning identical with the general understanding of those of ordinary skill in fields of the present invention.Should also Understand, those terms such as defined in the general dictionary, it should be understood that have in the context of the prior art The consistent meaning of meaning, and unless idealization or meaning too formal otherwise will not be used by specific definitions as here To explain.
In one embodiment, as shown in FIG. 1, FIG. 1 is the flow chart of tool-class call method in one embodiment, this realities It applies and proposes a kind of tool-class call method in example, which can be applied in computer equipment, specifically may be used With the following steps are included:
Step S110: the tool-class that identification software program file includes from software project file obtains determining for tool-class Adopted information.
Tool-class is the Class Type in software project file.In this step, identify all defined in software project Tool-class, the and definition content of extracting tool class extracts the definition information of each tool-class.The definition information of tool-class can To be data structure and function defined in Class Type etc..
Extracted definition information can be used for establishing subsequent developing instrument template, execute program convenient for computer When structure type and function in developing instrument template in call definition information, carry out the compiling of program.
Step S120: according to the Function Identification information for defining information acquisition instrument class.
It include program code and annotation text in defining information in this step.Wherein, annotation text is often used for marking Note and interpreter code, embody the function of Class Type.And also comprising the element term and letter of data structure in program code Several titles, these element terms and function name can also sometimes reflect the function of Class Type by the meaning of name.Cause This is defined comprising the content for reflecting tool-class function in information, and marking instrument class corresponding function is extracted in information from defining Function Identification information.
Step S130: information and Function Identification information preservation will be defined in developing instrument template.
In this step, developing instrument template can be the text of the definition information of storage Class Type in software project file Part.
Step S140: in processing software item file, the calls tool class from developing instrument template.
In this step, in processing software item file, such as in exploitation and runs software item file, software project text The program code of part can from the developing instrument template of the software project file calls tool class, carry out writing or compiling for program It translates.
In addition, can be according to funcall tool-class when writing software project file, it at this time can be according to software project Required in file to use function, according to the corresponding Function Identification information of the function, searching and call from developing instrument template should The corresponding tool-class of Function Identification information.
The definition code of the tool-class dispersed in software project file can be incorporated into finger by above-mentioned tool-class call method In fixed developing instrument template, convenient in developing instrument template calls tool class, reduce in software project file traversal and Calls tool class after multiple files is searched, the calling efficiency of tool-class is improved.
And tool-class when compiling in calling developing instrument template, it avoids opening multiple texts comprising tool-class Part reduces the consumption of memory.
When in face of file amount very more Large-Scale Projects, as the software project file of Large-Scale Projects, In software program file it is various and relationship is complicated, may according to framework architecture or realize the complicated relationships such as function into Row storage, often developer is to be difficult to be understood quickly Large-Scale Projects simultaneously while the known tool-class dispersed, is calling work Also the function of tool-class can not be quickly consulted when having class, increase the difficulty of calls tool class.And when developer fails to find The tool-class of correlation function, in order to continue to develop, developer often overlapping development and define the correlation function work Have class, causes developer to carry out the duplication of labour, reduce the efficiency of project development and increase time cost.It is big for consulting For type software project, the readability of project is improved.
In one embodiment, software project file includes multiple software program files, and software program file can be soft The file of logging software program in part item file.
The tool-class that identification software program file includes from software project file in step S110 obtains determining for tool-class The step of adopted information may include:
A1: each software program file of traversal item file identifies in the program code of software program file Tool-class definition mark.
It include multiple software program files in software project file, the definition code of tool-class is stored in soft in this step In part program file, software project in the stage of exploitation be it is discontinuous, software program file can according in exploitation demand to journey The demand of sequence framework and function is gradually developed, therefore the definition of tool-class can be dispersed in software project with exploitation demand, Each software program file is needed to be traversed for identify tool-class all in software project file.
A2: the class name of marker extraction tool-class is defined according to tool-class and the program code for defining tool-class.
In this step, the definition of tool-class includes the class name of tool-class and the definition format of tool-class, and tool-class is determined Adopted format is the program code for defining tool-class, and wherein definition format generally may include stating part and realization part, Often the title of the data member including tool-class and the title of function member, realization part may include into for statement part The definition information of member or the code of algorithm.
A3: using the class name of tool-class and definition information of the program code as tool-class for being used to define tool-class.
Above-mentioned tool-class call method, the class name and program code of identification facility class, by the class name and journey of tool-class The information of tool-class entirely defined can be stored in developing instrument template by definition information of the sequence code as tool-class, It is called when not only can be in order to compile and realizes function, also improve the readability of developing instrument template.
In one embodiment, the step of in step S120 according to the Function Identification information for defining information acquisition instrument class, May include:
B11: identification defines the annotation text in information.
It will use specific sign field dispensing annotations sheet in program code, it can be according to the Symbol recognition of marker annotations text Annotate text.
B12: the Function Identification information of marking instrument class function is extracted from annotation text.
Above-mentioned tool-class call method annotates the information that may include annotation tool class function in text, is infused by identification Annotations sheet and the Function Identification information for extracting description instrument class function, complete the identification of the function point of tool-class.
For example, extracting keyword in annotation text, such as the verb in annotation text can be extracted, note can also be extracted For explaining that the text information for realizing the principle of code, this text information for explaining principle are facing principle of uniformity in annotations sheet But for the function of different usage scenarios, the lookup and access of same type tool-class can be convenient for well.
In one embodiment, the step of in step S120 according to the Function Identification information for defining information acquisition instrument class, May include:
B21: the method for calling of tool-class is determined according to the definition information of tool-class.
What method of calling can be determined by tool-class realization of functions and usage scenario, directly and objectively it is embodied in work In the definition information for having class, it is embodied in the quantity of data member in tool-class, the call format of function member, function member return Return format, publicly-owned member, privately owned member etc..
Such as can be seen that function member according to the definition information of tool-class is for calculating and returning calculated value, function Member can be used for change state and without return value;Tool-class can be used for storage organization data, and tool-class can also be with It can also both storing data include simultaneously function member for storage function member;Member in tool-class can be it is publicly-owned, Be also possible to it is privately owned, between tool-class can by inherit obtain call other tool-class in data member or function at Member.
B22: the call type of tool-class is determined according to method of calling.
It is illustrated by taking the format of returned data as an example, tool can be determined according to the format of returned data in method of calling The call type of class, if without returned data after function Member call in tool-class, it is determined that the tool-class includes no return value Type.Call type possessed by tool-class can also be determined according to other method of calling.
B23: using the call type of tool-class as Function Identification information.
Development process chooses whether to call the tool-class according to the call type that tool-class has, at this time by the tune of tool-class The function of the achievable method of calling of tool-class is reflected with type.
Above-mentioned tool-class call method, can be using the call type as Function Identification information, the function of marking instrument class.
Further, the tool-class in open tool palette can also be divided according to the Function Identification information of tool-class Class.Classified according to Function Identification information to tool-class, same type of tool-class is documented in time template, by variety classes Multiple secondary templates form developing instrument templates.
In one embodiment, information and Function Identification information preservation will be defined in developing instrument template in step S130 The step of before, can also include:
C1: according to the definition information of code writing rule detection tool-class, and testing result is obtained.
Code writing rule refers to the program coding rule to be followed, it should be noted that the correctness of code, stability, can The property read;It to avoid being substituted using not intelligible number with significant mark in coding, not use craftsmenship hard to understand Very high sentence;The more close code of relationship should be as adjacent as possible in source program.In typesetting, annotation, name, readability, change Amount, functional procedure, measurability, program efficiency, quality assurance etc. can detect tool-class.
C2: when testing result is expressed as in tool-class without markup information, to tool-class mark for reminding mark to mention Show information.
When lacking paraphrase in the definition information of tool-class, developer is needed to re-read function and work with reasoning tool class With reducing the readability of tool-class.
C3: when the definition information that testing result is expressed as tool-class can optimize, to tool-class mark for reminding optimization The prompt information of code.
When define information sentence write or typesetting in, occur typesetting or name it is inappropriate, not only will affect tool-class Readability, be also easy to that subsequent code is caused to write error.Such as it can be with lines of code in statistical definition information, function member Parameter number or the code statement for identifying given category are detected whether to meet code writing rule, be provided according to testing result Prompt information is defined the optimization of information convenient for developer according to prompt information, improves the readability of tool-class.
Above-mentioned tool-class call method, before preservation can also the definition information to tool-class check that detection is fixed Whether adopted information accords with code writing rule, and the readability for not meeting the tool-class that code writing rule is write is poor, to not meeting The tool-class of code writing rule issues prompt information, convenient for improving during subsequent development to the tool-class, improves work Has the readability of class.
In one embodiment, information and Function Identification information preservation will be defined in developing instrument template in step S130 The step of after, can also include:
D11: the tool-class increased newly in identification software item file.
D12: newly-increased tool-class is stored in developing instrument template.
Above-mentioned tool-class call method, during software project development, along with the increase of function, tool-class also can be with Increase, for the ease of it is subsequent it is timely call newly-increased tool-class, need to regularly update developing instrument template.
In one embodiment, information and Function Identification information preservation will be defined in developing instrument template in step S130 The step of after, can also include:
D21: check that developing instrument template whether there is the tool-class of identical function.
D22: the duplicate tool-class from the tool-class for removing identical function in developing instrument template.
Above-mentioned tool-class call method is deleted duplicate when the tool-class recorded in developing instrument template duplicates Tool-class.
In one embodiment, information and Function Identification information preservation will be defined in developing instrument template in step S130 The step of after, can also include:
E1: the calling situation in software project file to tool-class is obtained.
E2: when the call number in the calling situation of any one tool-class is zero, which is identified for reminding The prompt information of never call.
If abandoning Some tools class because project changes, the Some tools class is no longer called, it is necessary to delete this Called tool-class, above-mentioned tool-class call method can not reduce the occupied memory space of developing instrument template for part.
In one embodiment, in processing software item file, from developing instrument template the step of calls tool class Before, further includes:
F1: term is obtained.
In this step, obtains developer and input term, term can be the usage mode, function, principle of tool-class Relevant keyword.
F2: term is matched with definition information or Function Identification information, obtains and examines from developing instrument template The matched tool-class of rope word.
In this step, tool-class is retrieved according to function, matches several close or relevant tool-class.Definition Information and Function Identification information can reflect the information such as the usage mode, function and principle of tool-class.Such as define the journey of information Part names in sequence code can reflect the function and usage mode of tool-class, especially carry out according to code writing rule Code is write, and some naming rules can make the information such as function and principle be directly recorded on the member Name of tool-class; Also it can directly reflect the function of tool-class in Function Identification information.From define matching is carried out in information and Function Identification information can be with Quickly determine matched tool-class.
F3: matched tool-class is returned.
In this step, can return matched tool-class title, prompt developer the tool-class is called.Into One step, can also return matched tool-class notes content, prompt how the developer tool-class uses.
Above-mentioned tool-class call method can quickly consult the tool-class of needs convenient for developer.
In one embodiment, in order to can with convenient developer's maintenance tool class, can to exploitation tool palette in work Tool class retrieves tool-class according to calling situation.Called number etc. of the periodic statistical tool-class in exploration project file Called situation.Each tool-class situation that is called can be consulted and then show the tool when the call number of tool-class is more It is more common in exploration project, or indicate that the Exploitation degree of tool place module is deeper.It in addition can also be when default Between point retrieve the information which tool-class is not called temporarily such as in project development period deadline, can exploitation work Special marking is carried out in tool template, in order to which developer can be handled in time not called tool-class.
As shown in Fig. 2, Fig. 2 is the flow chart of tool-class call method in another embodiment, one is provided in the present embodiment Kind tool-class call method, can specifically include following steps:
Step 210: the tool-class that identification software program file includes from software project file obtains the definition of tool-class Information.Wherein, tool-class is the Class Type in software project file, and the definition information of tool-class can be Class Type and be defined Data structure and function etc..
Each software program file of traversal item file, the identification facility in the program code of software program file Class definition mark.The class name of marker extraction tool-class is defined according to tool-class and the program code for defining tool-class.It will The class name of tool-class and definition information of the program code as tool-class for defining tool-class.
It, can be by the entire definition of tool-class using the class name of tool-class and program code as the definition information of tool-class Information be stored in developing instrument template, call when first can be in order to compile and realize function, next is also improved out Send out the readability of tool palette.
Step 220: according to the Function Identification information for defining information acquisition instrument class.
It wherein, include program code and annotation text in defining information.Annotation text is often used for marking and explain Program code embodies the function of tool-class.And in program code also include data structure element term and function name, this A little element terms and function name can also sometimes reflect the function of tool-class by the meaning of name.Therefore information is defined In comprising content for reflecting tool-class function, from defining the Function Identification letter for extracting marking instrument class corresponding function in information Breath.
For example, the annotation text defined in information can be identified;The function of marking instrument class function is extracted from annotation text It can identification information.The method of calling of tool-class can also be determined according to the definition information of tool-class;Work is determined according to method of calling Has the call type of class;Using the call type of tool-class as Function Identification information.
Step 230: the definition information of tool-class being checked, mark is for reminding the prompt information improved and optimized.
According to the definition information of code writing rule detection tool-class, and obtain testing result;When testing result is expressed as When in tool-class without markup information, to tool-class mark for reminding the prompt information of mark;When testing result is expressed as tool When the definition information of class can optimize, the prompt information for reminding Optimized code is identified to tool-class.
Step 240: information and Function Identification information preservation will be defined in developing instrument template.
Tool-class in open tool palette can be subjected to classified emission according to the Function Identification information of tool-class.According to Function Identification information classifies to tool-class, and same type of tool-class is documented in time template, will be different types of multiple Secondary template forms developing instrument template.
It further needs exist for regularly updating developing instrument template, the newly-increased tool-class of addition, deletion are repeated or do not adjusted in time Tool-class.The tool-class increased newly in identification software item file;Newly-increased tool-class is stored in developing instrument template.Inspection Looking into developing instrument template whether there is the tool-class of identical function;From the tool-class for removing identical function in developing instrument template Duplicate tool-class.Obtain the calling situation in software project file to tool-class;In the calling situation of any one tool-class Call number when being zero, the prompt information for reminding never call is identified to the tool-class, remind developer delete this not by The tool-class of calling.
Step 250: in processing software item file, the calls tool class from developing instrument template.
In processing software item file, such as in exploitation and runs software item file, the program of software project file Code can from the developing instrument template of the software project file calls tool class, carry out writing or compiling for program.
In addition, can be according to funcall tool-class when writing software project file, it at this time can be according to software project Required in file to use function, according to the corresponding Function Identification information of the function, searching and call from developing instrument template should The corresponding tool-class of Function Identification information.
Step 260: being retrieved according to tool-class of the function to exploitation tool palette.
Obtain term;Term is matched with definition information or Function Identification information, from developing instrument template It obtains and the matched tool-class of term;Matched tool-class is returned, developer is prompted to call the work in software project file Has class.
The definition code of the tool-class dispersed in software project file can be incorporated into finger by above-mentioned tool-class call method In fixed developing instrument template, convenient in developing instrument template calls tool class, reduce in software project file traversal and Calls tool class after multiple files is searched, the calling efficiency of tool-class is improved.And developing instrument mould is called when compiling Tool-class in plate avoids opening multiple files comprising tool-class, reduces the consumption of memory.
In one embodiment, as shown in figure 3, Fig. 3 is the structural schematic diagram of tool-class calling system in one embodiment, A kind of tool-class calling system is provided in the present embodiment, can specifically include tool-class identification module 310, Function Identification obtains mould Block 320, developing instrument template preserving module 330 and tool-class calling module 340, in which:
Tool-class identification module 310 is obtained for the tool-class that identification software program file includes from software project file Obtain the definition information of tool-class.
In tool-class identification module 310, tool-class is the Class Type in software project file.In this step, identification exists All defined tool-class in software project, and the definition content of extracting tool class extract the definition letter of each tool-class Breath.The definition information of tool-class can be data structure and function defined in Class Type etc..Extracted definition information can be with For establishing subsequent developing instrument template, it is convenient for computer call definition in developing instrument template when executing program Structure type and function in information, carry out the compiling of program.
Function Identification obtains module 320, for according to the Function Identification information for defining information acquisition instrument class.
Function Identification obtains in module 320, and defining in information includes program code and annotation text.Wherein, annotation text Originally it is often used for label and interpreter code, embodies the function of Class Type.It and also include data structure in program code Element term and function name, these element terms and function name can also sometimes reflect class class by the meaning of name The function of type.Therefore it defines comprising the content for reflecting tool-class function in information, extracts marking instrument from defining in information The Function Identification information of class corresponding function.
Developing instrument template preserving module 330, for information and Function Identification information preservation will to be defined in developing instrument mould In plate.
Developing instrument template can be the file of the definition information of storage Class Type in software project file.
Tool-class calling module 340 is used for the calls tool from developing instrument template in processing software item file Class.
Tool-class calling module 340 is soft such as in exploitation and runs software item file in processing software item file The program code of part item file can from the developing instrument template of the software project file calls tool class, carry out program It writes or compiles.
In addition, can be according to funcall tool-class when writing software project file, it at this time can be according to software project Required in file to use function, according to the corresponding Function Identification information of the function, searching and call from developing instrument template should The corresponding tool-class of Function Identification information.
The definition code of the tool-class dispersed in software project file can be incorporated into finger by above-mentioned tool-class calling system In fixed developing instrument template, convenient in developing instrument template calls tool class, reduce in software project file traversal and Calls tool class after multiple files is searched, the calling efficiency of tool-class is improved.
And tool-class when compiling in calling developing instrument template, it avoids opening multiple texts comprising tool-class Part reduces the consumption of memory.
When in face of file amount very more Large-Scale Projects, as the software project file of Large-Scale Projects, In software program file it is various and relationship is complicated, may according to framework architecture or realize the complicated relationships such as function into Row storage, often developer is to be difficult to be understood quickly Large-Scale Projects simultaneously while the known tool-class dispersed, is calling work Also the function of tool-class can not be quickly consulted when having class, increase the difficulty of calls tool class.And when developer fails to find The tool-class of correlation function, in order to continue to develop, developer often overlapping development and define the correlation function work Have class, causes developer to carry out the duplication of labour, reduce the efficiency of project development and increase time cost.It is big for consulting For type software project, the readability of project is improved.
Specific about tool-class calling system limits the restriction that may refer to above for tool-class call method, This is repeated no more.Modules in above-mentioned tool-class calling system can come fully or partially through software, hardware and combinations thereof It realizes.Above-mentioned each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also be with software Form is stored in the memory in computer equipment, executes the corresponding operation of the above modules in order to which processor calls.
As shown in figure 4, Fig. 4 is the schematic diagram of internal structure of computer equipment in one embodiment.The computer equipment packet Include processor, non-volatile memory medium, memory and the network interface connected by system bus.Wherein, which sets Standby non-volatile memory medium is stored with operating system, database and computer-readable instruction, can be stored with control in database Part information sequence when the computer-readable instruction is executed by processor, may make processor to realize a kind of tool-class call method. The processor of the computer equipment supports the operation of entire computer equipment for providing calculating and control ability.The computer It can be stored with computer-readable instruction in the memory of equipment, when which is executed by processor, may make place Reason device executes a kind of tool-class call method.The network interface of the computer equipment is used for and terminal connection communication.This field skill Art personnel are appreciated that structure shown in Fig. 4, only the block diagram of part-structure relevant to application scheme, not structure The restriction for the computer equipment that pairs of application scheme is applied thereon, specific computer equipment may include than institute in figure Show more or fewer components, perhaps combines certain components or with different component layouts.
In one embodiment it is proposed that a kind of computer equipment, computer equipment include memory, processor and storage On a memory and the computer program that can run on a processor, processor realize any of the above-described reality when executing computer program The step of applying tool-class call method in example.
In one embodiment it is proposed that a kind of storage medium for being stored with computer-readable instruction, this is computer-readable When instruction is executed by one or more processors, so that one or more processors execute tool-class tune in any of the above-described embodiment The step of with method.
It should be understood that although each step in the flow chart of attached drawing is successively shown according to the instruction of arrow, These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, can execute in the other order.Moreover, at least one in the flow chart of attached drawing Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, execution sequence, which is also not necessarily, successively to be carried out, but can be with other At least part of the sub-step or stage of step or other steps executes in turn or alternately.
The above is only some embodiments of the invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (10)

1. a kind of tool-class call method, which comprises the steps of:
The tool-class that identification software program file includes from software project file obtains the definition information of the tool-class;
According to the Function Identification information for defining tool-class described in acquisition of information;
By the definition information and the Function Identification information preservation in developing instrument template;
When handling the software project file, the tool-class is called from the developing instrument template.
2. tool-class call method according to claim 1, which is characterized in that it is described identified from software project file it is soft The tool-class that part program file includes, the step of obtaining the definition information of the tool-class, comprising:
The each software program file for traversing the software project file, identifies in the program code of the software program file Tool-class definition mark;
The class name of tool-class described in marker extraction is defined according to the tool-class and the program generation for defining the tool-class Code;
The class name of the tool-class and the program code for being used to define the tool-class are believed as the definition of the tool-class Breath.
3. tool-class call method according to claim 1, which is characterized in that described according to definition acquisition of information institute The step of stating the Function Identification information of tool-class, comprising:
Identify the annotation text defined in information;
The Function Identification information of marking instrument class function is extracted from the annotation text;
And/or the method for calling of the tool-class is determined according to the definition information of the tool-class;
The call type of the tool-class is determined according to the method for calling;
Using the call type of the tool-class as the Function Identification information.
4. tool-class call method according to claim 1, which is characterized in that described by the definition information and described Function Identification information preservation is before the step in developing instrument template, further includes:
According to the definition information of tool-class described in code writing rule detection, and obtain testing result;
When the testing result is expressed as in the tool-class without markup information, to tool-class mark for reminding mark Prompt information;
When the definition information that the testing result is expressed as the tool-class can optimize, the tool-class is identified for reminding The prompt information of Optimized code.
5. tool-class call method according to claim 1, which is characterized in that described by the definition information and described Function Identification information preservation is after the step in developing instrument template, further includes:
Identify the tool-class increased newly in the software project file;
The newly-increased tool-class is stored in the developing instrument template;
And/or
Check that the developing instrument template whether there is the tool-class of identical function;
The duplicate tool-class from the tool-class for removing the identical function in the developing instrument template.
6. tool-class call method according to claim 1, which is characterized in that described by the definition information and described Function Identification information preservation is after the step in developing instrument template, further includes:
Obtain the calling situation in the software project file to the tool-class;
When call number in the calling situation of any one tool-class is zero, which is identified for reminding never call Prompt information.
7. tool-class call method according to claim 1, which is characterized in that handling the software project text described When part, before the step of calling the tool-class in the developing instrument template, further includes:
Obtain term;
The term is matched with definition information or Function Identification information, acquisition and institute from the developing instrument template State the matched tool-class of term;
Return to the matched tool-class.
8. a kind of tool-class calling system characterized by comprising
Tool-class identification module, for the tool-class that identification software program file includes from software project file, described in acquisition The definition information of tool-class;
Function Identification obtains module, for according to the Function Identification information for defining tool-class described in acquisition of information;
Developing instrument template preserving module is used for the definition information and the Function Identification information preservation in developing instrument mould In plate;
Tool-class calling module, described in being called from the developing instrument template when handling the software project file Tool-class.
9. a kind of computer equipment, including memory and processor, it is stored with computer-readable instruction in the memory, it is special Sign is, when the computer-readable instruction is executed by the processor, so that the processor executes such as claim 1 to 7 Any one of described in tool-class call method the step of.
10. a kind of storage medium for being stored with computer-readable instruction, which is characterized in that the computer-readable instruction is by one Or multiple processors are when executing, so that one or more processors execute the tool-class tune as described in any one of claims 1 to 7 The step of with method.
CN201910113105.0A 2019-02-13 2019-02-13 Tool-class call method, system, computer equipment and storage medium Pending CN110007900A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910113105.0A CN110007900A (en) 2019-02-13 2019-02-13 Tool-class call method, system, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910113105.0A CN110007900A (en) 2019-02-13 2019-02-13 Tool-class call method, system, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110007900A true CN110007900A (en) 2019-07-12

Family

ID=67165750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910113105.0A Pending CN110007900A (en) 2019-02-13 2019-02-13 Tool-class call method, system, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110007900A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110030A (en) * 2007-08-23 2008-01-23 南京联创科技股份有限公司 Developing method for data base persistence layer based on JAVA
CN105468381A (en) * 2016-01-04 2016-04-06 苏州奇松软件有限公司 Android and IOS system and operating method for rapidly integrating third-party class libraries
CN105843600A (en) * 2016-02-29 2016-08-10 乐视体育文化产业发展(北京)有限公司 Data editing method, apparatus and system
CN107741845A (en) * 2017-12-04 2018-02-27 山东浪潮通软信息科技有限公司 A kind of generation method and device of self defined class example
CN109086038A (en) * 2018-07-10 2018-12-25 千寻位置网络有限公司 Big data development approach and device, terminal based on Spark

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110030A (en) * 2007-08-23 2008-01-23 南京联创科技股份有限公司 Developing method for data base persistence layer based on JAVA
CN105468381A (en) * 2016-01-04 2016-04-06 苏州奇松软件有限公司 Android and IOS system and operating method for rapidly integrating third-party class libraries
CN105843600A (en) * 2016-02-29 2016-08-10 乐视体育文化产业发展(北京)有限公司 Data editing method, apparatus and system
CN107741845A (en) * 2017-12-04 2018-02-27 山东浪潮通软信息科技有限公司 A kind of generation method and device of self defined class example
CN109086038A (en) * 2018-07-10 2018-12-25 千寻位置网络有限公司 Big data development approach and device, terminal based on Spark

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘胡来: "app项目设计规范_app设计规范实例", pages 1 - 2, Retrieved from the Internet <URL:《CSDN:https://blog.csdn.net/d06110902002/article/details/80590743》> *

Similar Documents

Publication Publication Date Title
US9858270B2 (en) Converting data into natural language form
US8949166B2 (en) Creating and processing a data rule for data quality
US8875110B2 (en) Code inspection executing system for performing a code inspection of ABAP source codes
US9934220B2 (en) Content revision using question and answer generation
US8806452B2 (en) Transformation of computer programs and eliminating errors
CN108614898A (en) Document method and device for analyzing
CN108647355A (en) Methods of exhibiting, device, equipment and the storage medium of test case
CN110347598B (en) Test script generation method and device, server and storage medium
CN109491658A (en) The generation method and device of computer-executable code data
EP3683683A1 (en) Test cycle optimization using contextual association mapping
CN109710518A (en) Script checking method and device
CN111680634A (en) Document file processing method and device, computer equipment and storage medium
JP2012212422A (en) Information processor, information processing method, and program
WO2006136055A1 (en) A text data mining method
CN108563561B (en) Program implicit constraint extraction method and system
CN112417852B (en) Method and device for judging importance of code segment
EP3407204A1 (en) Methods and systems for translating natural language requirements to a semantic modeling language statement
CN117272982A (en) Protocol text detection method and device based on large language model
CN109471637B (en) Circuit diagram examination script debugging method
CN110007900A (en) Tool-class call method, system, computer equipment and storage medium
CN113779200A (en) Target industry word stock generation method, processor and device
CN109284097A (en) Realize method, equipment, system and the storage medium of complex data analysis
CN110955433B (en) Automatic deployment script generation method and device
JP2011227695A (en) Test case creation system, method and program and test viewpoint creation system
CN116931943A (en) Grammar conversion method and device of index definition text and electronic equipment

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