CN103645927B - Method and device for calling correlation module - Google Patents

Method and device for calling correlation module Download PDF

Info

Publication number
CN103645927B
CN103645927B CN201310577919.2A CN201310577919A CN103645927B CN 103645927 B CN103645927 B CN 103645927B CN 201310577919 A CN201310577919 A CN 201310577919A CN 103645927 B CN103645927 B CN 103645927B
Authority
CN
China
Prior art keywords
bag
relating module
target class
goal approach
framework
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
CN201310577919.2A
Other languages
Chinese (zh)
Other versions
CN103645927A (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.)
Xinle Visual Intelligent Electronic Technology Tianjin Co ltd
Leshi Zhixin Electronic Technology Tianjin Co Ltd
Original Assignee
Leshi Zhixin Electronic Technology Tianjin 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 Leshi Zhixin Electronic Technology Tianjin Co Ltd filed Critical Leshi Zhixin Electronic Technology Tianjin Co Ltd
Priority to CN201310577919.2A priority Critical patent/CN103645927B/en
Publication of CN103645927A publication Critical patent/CN103645927A/en
Application granted granted Critical
Publication of CN103645927B publication Critical patent/CN103645927B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The invention provides a method for calling a correlation module. The correlation module is a correlation module which is moved out of a framework.jar packet in advance and has a preset packet name. The method comprises the steps that a packet of the correlation module is obtained according to the preset packet name of the correlation module, a target class is searched for in the packet of the correlation module, and the target class is an unoccupied class. When the target class is found out, a target method is searched for in the target class, and the target method is an unoccupied method; when the target method is found in the target class, the target method and the method parameter of the target method are obtained; the target method and the method parameter are called in a reflection mode through a java reflection mechanism. By adopting the java reflection mechanism, the method of the correlation module which has been moved out of the framework.jar packet is called reversely, a compilation process does not depend on the correlation module, normal calling of the correlation module is not affected after the correlation module is moved out, and the functions of the framework.jar packet are guaranteed.

Description

A kind of method and apparatus calling relating module
Technical field
The application belongs to intelligent television field, particularly relates to a kind of method and apparatus calling relating module.
Background technology
TV is modal household electrical appliance in modern society, along with the development of science and technology, has standard-sized sheet Putting formula platform, the intelligent television being equipped with operating system also arises at the historic moment.User is based on this intelligent television While appreciating general television content, types of applications software can be installed and uninstalled voluntarily, sustainable to intelligence The function of energy TV carries out expanding and upgrading, it is possible to bring abundant individualized experience to user.
Intelligent television uses Android (android) system at present.Framework at Android system is developed During, specially in the development process of ccf layer, the side operator added in the jar bag of java has higher limit 65536, and the framework.jar under android wraps in and adds substantial amounts of method in compilation process, causes Side operator in framework.jar bag exceedes higher limit, reports an error so that this jar bag cannot generate.
In prior art, the method solving to add in jar bag exceeds the method for higher limit for selecting in jar bag Part of module set up new jar bag removal, selection according to be this removal module be with jar bag in other The uncorrelated module of module, but module uncorrelated with other modules is less, even if the module that will select After setting up the removal of new jar bag, the side operator that can continue in this former jar bag add is little so that this removal Have little significance.
Framework.jar bag also has other have the module of relatively multi-method, remove this module, can make former Jar bag increases substantial amounts of side operator.But, owing to having, the module of relatively multi-method is general and other modules Having association, this module with relatively multi-method is called relating module, is once removed by this relating module, Can make to call this relating module when the compiling of framework.jar bag generates and mistake occurs, it is impossible to generate Framework.jar bag, it is impossible to realize correct compilation process, causes the final Android system cannot be just Really compiling.
Summary of the invention
In view of this, the purpose of the application is to provide a kind of method and apparatus calling relating module, adopts Use java reflex mechanism, reverse calling relating module so that compilation process is independent of relating module, move Normal call relating module is not affected, it is ensured that the function of framework.jar bag after going out.
A kind of method calling relating module, described relating module is to move in framework.jar bag in advance The relating module with default bag name gone out, the method includes:
According to the default bag name of described relating module, obtain the bag of described relating module, and in described pass Searching target class in the bag of gang mould block, described target class is unappropriated class;
When finding target class, searching goal approach in described target class, described goal approach is not Occupied method;
When finding goal approach in described target class, obtain described goal approach and described target side The method parameter of method;
Utilize java reflex mechanism, described goal approach and method parameter are reflected and calls to framework.jar Bag, so that the compiling of described framework.jar bag is correctly carried out.
Above-mentioned method, it is preferred that described after finding target class, searches in described target class Before goal approach, also include:
Carry out assignment for described target class to take.
Above-mentioned method, it is preferred that after finding goal approach in described target class, obtains institute Before stating the method parameter of goal approach and described goal approach, also include:
Take for described goal approach assignment.
Above-mentioned method, it is preferred that remove relating module in advance in framework.jar bag and include:
When judging to obtain that in framework.jar bag, side operator reaches default higher limit, by described association Module removes;
The described relating module that java reflex mechanism is removal is utilized to preset bag name, and by described relating module Default bag name feed back to framework.jar bag;
The default bag name of described relating module is sent in the Android.mk to Java.jar bag so that Described Android.mk increases the default bag name of described relating module.
Above-mentioned method, it is preferred that also include:
When the bag at described relating module is not searched target class or when not searching in described target class During to goal approach, generate warning message and report to the police.
A kind of device calling relating module, described relating module is to move from framework.jar bag in advance The relating module with default bag name gone out, this device includes:
First searches unit, for the default bag name according to described relating module, obtains described pass gang mould The bag of block, and in the bag of described relating module, search target class, described target class is unappropriated class;
Second searches unit, for when finding target class, searches goal approach in described target class, Described goal approach is unappropriated method;
Acquiring unit, in time finding goal approach in described target class, obtains described goal approach And the method parameter of described goal approach;
Reflector element, is used for utilizing java reflex mechanism, described goal approach and method parameter is reflected and adjusts With to framework.jar bag, so that the compiling of described framework.jar bag is correctly carried out.
Above-mentioned device, it is preferred that also include:
Class takies unit, for after finding target class, searches goal approach in described target class Before, carry out assignment for described target class to take.
Above-mentioned device, it is preferred that also include:
Method takies unit, for after finding goal approach in described target class, obtains described Before the method parameter of goal approach and described goal approach, take for described goal approach assignment.
Above-mentioned device, it is preferred that also include:
Removal unit, for when judging that obtaining side operator in framework.jar bag reaches default higher limit Time, described relating module is removed;
Preset bag name unit, for utilizing the described relating module that java reflex mechanism is removal to preset bag name;
Transmitting element, for the default bag name of described relating module is fed back to framework.jar bag, and And the default bag name of described relating module is sent in the Android.mk to Java.jar bag so that institute State Android.mk and increase the default bag name of described relating module.
Above-mentioned device, it is preferred that also include:
Alarm unit, for when not searching target class or when described in the bag at described relating module When target class does not finds goal approach, generate warning message and report to the police.
This application provides a kind of method calling relating module, described relating module be in advance from The relating module with default bag name of removal in framework.jar bag, the method includes: according to described The default bag name of relating module, obtain the bag of described relating module, and in the bag of described relating module Searching target class, described target class is unappropriated class;When finding target class, in described target Apoplexy due to endogenous wind searches goal approach, and described goal approach is unappropriated method;Described target class is searched During to goal approach, obtain described goal approach and the method parameter of described goal approach;Utilize java Reflex mechanism, reflects described goal approach and method parameter and calls.Use java reflex mechanism, reversely Call the method in the relating module having been moved out framework.jar bag so that compilation process is independent of close Gang mould block, does not affect normal call relating module, it is ensured that the function of framework.jar bag after removal.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present application or technical scheme of the prior art, below will be to reality Execute the required accompanying drawing used in example or description of the prior art to be briefly described, it should be apparent that below, Accompanying drawing in description is some embodiments of the application, for those of ordinary skill in the art, not On the premise of paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the flow chart of a kind of embodiment of the method 1 calling relating module that the application provides;
Fig. 2 is another flow chart of a kind of embodiment of the method 1 calling relating module that the application provides;
Fig. 3 is the flow chart of a kind of embodiment of the method 2 calling relating module that the application provides;
Fig. 4 is the flow chart of a kind of embodiment of the method 3 calling relating module that the application provides;
Fig. 5 is the structural representation of a kind of device embodiment 1 calling relating module that the application provides;
Fig. 6 is that the another kind of structure of a kind of device embodiment 1 calling relating module that the application provides is shown It is intended to;
Fig. 7 is the structural representation of a kind of device embodiment 2 calling relating module that the application provides;
Fig. 8 is the structural representation of a kind of device embodiment 3 calling relating module that the application provides.
Detailed description of the invention
For making the purpose of the embodiment of the present application, technical scheme and advantage clearer, below in conjunction with this Shen Please accompanying drawing in embodiment, the technical scheme in the embodiment of the present application is clearly and completely described, Obviously, described embodiment is some embodiments of the present application rather than whole embodiments.Based on Embodiment in the application, those of ordinary skill in the art are obtained under not making creative work premise The every other embodiment obtained, broadly falls into the scope of the application protection.
In the embodiment of the present application, can be that framework.jar bag is any be associated relating module with other modules Module, be typically the module of relatively multi-method, such as, webkit module, bluetooth module, phone The various module such as module.
Embodiment 1
See Fig. 1, it is shown that a kind of method flow diagram calling relating module that the embodiment of the present application 1 provides, Including:
Step S101: according to the default bag name of described relating module, obtain the bag of described relating module, And in the bag of described relating module, search target class;
In the present embodiment relating module be in advance from framework.jar bag removal there is default bag name Relating module, is to have related module with other modules in framework.jar bag.
Wherein, described target class is unappropriated class.
In invoked procedure, it is first depending on the default bag name of relating module, obtains the bag of this relating module, When the bag of this relating module is to be removed by this relating module, this relating module is moved as a new jar bag Going out, the bag of this relating module is preset with bag name, and then searches target class in the bag of relating module, in order to Prevent because the same class in relating module is repeatedly called and makes compilation process go wrong, therefore, Needing the unappropriated class calling in relating module, i.e. this target class is unappropriated class.
Step S102: when finding target class, searches goal approach in described target class;
Wherein, described goal approach is unappropriated method.
After finding target class in the bag of relating module, in this target class, continue to search for goal approach, Similar with target class, make because the same method in target class is repeatedly called to prevent Compilation process goes wrong, accordingly, it would be desirable to the unappropriated method of invocation target apoplexy due to endogenous wind, i.e. the method For unappropriated method.
Step S103: when finding goal approach in described target class, obtains described goal approach and institute State the method parameter of goal approach;
When finding goal approach in target class, during obtaining this goal approach, obtain simultaneously The method parameter of this goal approach, in order to when calling the method, obtains the content that the method is whole: side Method and method parameter.
Step S104: utilize java reflex mechanism, described goal approach and method parameter are reflected call to Framework.jar bag, so that the compiling of described framework.jar bag is correctly carried out.
Utilize java reflex mechanism, this goal approach and method parameter are reflected and calls to framework.jar Bag so that this framework.jar bag is compiled according to this goal approach and method parameter.
Utilize java reflex mechanism to substitute former call method, the method in relating module is called, real Show the method calling in relating module, reached same effect of calling, and compile and be independent of this pass gang mould The source code of block, is not affected by removing this relating module, it is ensured that make described framework.jar bag Compiling is correctly carried out.
See Fig. 2, it is shown that another of a kind of method calling relating module that the embodiment of the present application 1 provides Flow chart, in the flow chart shown in Fig. 1, also includes step S105 between step S101 and step S102, Step S106 is also included between step S102 and step S103;
Step S105: when finding target class, carries out assignment for described target class and takies.
In invoked procedure, the bag of relating module is searched target class, in order to prevent because of relating module In same class repeatedly called and compilation process gone wrong, accordingly, it would be desirable to call pass gang mould Unappropriated class in block, i.e. this target class are unappropriated class.
During in order to prevent from calling next time, this target class is called again, and therefore, is finding this target After class, carry out assignment for this target class and take, next time in invoked procedure, from remaining unappropriated Apoplexy due to endogenous wind selects target class.
Step S106: when finding goal approach in described target class, for described goal approach assignment Take.
When finding goal approach in target class, during obtaining this goal approach, obtain simultaneously The method parameter of this goal approach, in order to when calling the method, obtains the content that the method is whole: side Method and method parameter.
During in order to prevent from calling next time, this goal approach is called again, and therefore, is finding this mesh After mark method, this goal approach is carried out assignment and takies, next time in invoked procedure, from remaining not by The method taken selects goal approach.
To sum up, a kind of method calling relating module that the embodiment of the present application 1 provides, use java reflection Mechanism, reverse calling has been moved out the method in the relating module of framework.jar bag, reaches same tune By effect so that compilation process is independent of relating module, after removal, do not affect normal call relating module, Ensure the function of framework.jar bag.
Embodiment 2
See Fig. 3, it is shown that a kind of method flow diagram calling relating module that the embodiment of the present application 2 provides, Before flow chart step S101 shown in Fig. 1, also include:
Step S107: when judging to obtain that in framework.jar bag, side operator reaches default higher limit, Described relating module is removed;
This higher limit can be the higher limit 65536 of jar bag, it is also possible to for default one less than this 65536 Integer value so that perform removal course of action in, remain able to continue at framework.jar bag Middle adding method.
When adding that in framework.jar bag, side operator reaches default higher limit to, for ensureing that compiling should Can correctly carry out during framework.jar bag, then need to be removed by this relating module, in this relating module There is more side operator, remove this relating module, it is possible to add more side for framework.jar bag Method provides space.
Step S108: utilize the described relating module that java reflex mechanism is removal to preset bag name, and by institute The default bag name stating relating module feeds back to framework.jar bag;
This relating module utilizing java reflex mechanism to be removal presets a bag name, and this is preset Bag name is sent to framework.jar bag, so that calling this relating module by framework.jar bag In method time, just can be found the relating module of this removal by this default bag name.
Step S109: the default bag name of described relating module is sent the Android.mk to Java.jar bag In so that described Android.mk increases the default bag name of described relating module.
The compilation process of Java.jar is system layer compiling, in order to ensure that the compiling of system layer should not by removal The impact of relating module, needs to send to Java.jar bag the default bag name of this removal module In Android.mk, in order to when system layer calls the goal approach in this relating module, it is possible to do not move out Before this relating module to call result identical so that the compiling of described Java.jar bag is correctly carried out.
To sum up, the embodiment of the present application 2 provides a kind of method calling relating module, also includes in advance The process of relating module is removed, in this process, by the relating module of removal from framework.jar bag Default bag name be sent in the Android.mk in framework.jar bag and Java.jar bag, it is ensured that The method called in the compilation process made with do not move out this relating module before to call result identical.
Embodiment 3
See Fig. 4, it is shown that the flow process of a kind of method calling relating module that the embodiment of the present application 3 provides Figure, in the flow chart shown in Fig. 1, also includes:
Step S110: judge whether to find target class from the bag of described relating module, if found, Perform step S102, otherwise perform step S112;
When not finding target class in the bag of relating module, then explanation is broken down, and generates alarm signal Breath is reported to the police, and programming by prompting personnel break down, and the bag Program of relating module is checked, adjusted.
Step S111: judging whether to find goal approach from described target class, if found, holding Row step S103, otherwise performs step S112;
Step S112: generate warning message and report to the police.
When not finding goal approach in target class, then explanation is broken down, and generates warning message report Alert, programming by prompting personnel break down, and the program of target class is checked, adjusted.
The mode that warning message is reported to the police can be multiple, such as: generates pop-up and carries out pointing out, generating warning The various modes such as sound prompting, concrete mode can be configured according to practical situation, the most superfluous in the present embodiment State.
To sum up, the embodiment of the present application 3 provides a kind of method calling relating module, also includes: when When not searching target class in the bag of described relating module or when not finding target in described target class During method, generate warning message and report to the police.When breaking down, it is ensured that programming personnel can obtain information, And then the program that this fault occurs checks, adjusts.
A kind of embodiment of the method calling relating module provided with above-mentioned the application is corresponding, the application Description additionally provides a kind of device embodiment calling relating module.
Embodiment 1
See Fig. 5, it is shown that the structure of a kind of device embodiment 1 calling relating module that the application provides Schematic diagram, including: first searches unit 101, second searches unit 102, acquiring unit 103 and reflection Unit 104;
Wherein, described first searches unit 101, for the default bag name according to described relating module, To the bag of described relating module, and in the bag of described relating module, search target class;
In the present embodiment relating module be in advance from framework.jar bag removal there is default bag name Relating module, is to have related module with other modules in framework.jar bag.
Wherein, described target class is unappropriated class.
In invoked procedure, first searches unit 101 is first depending on the default bag name of relating module, obtains The bag of this relating module, when the bag of this relating module is to be removed by this relating module, makees this relating module Being a new jar bag removal, the bag of this relating module is preset with bag name, and then in the bag of relating module Search target class, be made compiled in order to prevent because the same class in relating module is repeatedly called Journey goes wrong, accordingly, it would be desirable to the unappropriated class called in relating module, i.e. this target class are not Occupied class.
Wherein, described second searches unit 102, for when finding target class, in described target class Search goal approach;
Wherein, described goal approach is unappropriated method.
After the first lookup unit 101 finds target class in the bag of relating module, second searches unit 102 continue to search for goal approach in this target class, similar with target class, in order to prevent because of target The same method of apoplexy due to endogenous wind is repeatedly called and compilation process is gone wrong, accordingly, it would be desirable to call mesh The unappropriated method of mark apoplexy due to endogenous wind, i.e. the method is unappropriated method.
Wherein, described acquiring unit 103, in time finding goal approach in described target class, obtain Described goal approach and the method parameter of described goal approach;
When the second lookup unit 102 finds goal approach in target class, acquiring unit 103 obtains During this goal approach, obtain the method parameter of this goal approach, in order to calling the method simultaneously Time, obtain the content that the method is whole: method and method parameter.
Wherein, described reflector element 104, it is used for utilizing java reflex mechanism, by described method and method Parametric reflective calls to framework.jar bag, so that the compiling of described framework.jar bag is correctly entered OK.
Reflector element 104 utilizes java reflex mechanism, this goal approach and method parameter are reflected call to Framework.jar bag so that this framework.jar bag is compiled according to this goal approach and method parameter Translate.
Utilize java reflex mechanism to substitute former call method, the method in relating module is called, real Show the method calling in relating module, reached same effect of calling, and compile and be independent of this pass gang mould The source code of block, is not affected by removing this relating module, it is ensured that make described framework.jar bag Compiling is correctly carried out.
See Fig. 6, it is shown that another of a kind of device embodiment 1 calling relating module that the application provides Plant structural representation, in the structure shown in Fig. 5, also include: class takies unit 105 and method takies list Unit 106;
Wherein, described class takies unit 105, for after finding target class, in described target class Before searching goal approach, carry out assignment for described target class and take.
In invoked procedure, the bag of relating module is searched target class, in order to prevent because of relating module In same class repeatedly called and compilation process gone wrong, accordingly, it would be desirable to call pass gang mould Unappropriated class in block, i.e. this target class are unappropriated class.
During in order to prevent from calling next time, this target class is called again, and therefore, searches unit first After 101 find this target class, class takies unit 105 and carries out assignment for this target class and take, and adjusts next time During with, select target class from remaining unappropriated apoplexy due to endogenous wind.
Wherein, described method takies unit 106, for when find in described target class goal approach it After, before obtaining the method parameter of described goal approach and described goal approach, for described goal approach Assignment takies.
When finding goal approach in target class, during obtaining this goal approach, obtain simultaneously The method parameter of this goal approach, in order to when calling the method, obtains the content that the method is whole: side Method and method parameter.
During in order to prevent from calling next time, this goal approach is called again, and therefore, searches single second After unit 102 finds this goal approach, method takies unit 106 and this goal approach is carried out assignment takies, Next time in invoked procedure, from remaining unappropriated method, select goal approach.
To sum up, a kind of device calling relating module that the embodiment of the present application 1 provides, use java reflection Mechanism, reverse calling has been moved out the method in the relating module of framework.jar bag, reaches same tune By effect so that compilation process is independent of relating module, after removal, do not affect normal call relating module, Ensure the function of framework.jar bag.
Embodiment 2
See Fig. 7, it is shown that the structure of a kind of device embodiment 2 calling relating module that the application provides Schematic diagram, in the structure shown in Fig. 5, also includes: removes unit 107, presets bag name unit 108 and send out Send unit 109;
Wherein, described removal unit 107, reach for side operator in judgement obtains framework.jar bag During to the higher limit preset, described relating module is removed;
This higher limit can be the higher limit 65536 of jar bag, it is also possible to for default one less than this 65536 Integer value so that perform removal course of action in, remain able to continue at framework.jar bag Middle adding method.
When adding that in framework.jar bag, side operator reaches default higher limit to, for ensureing that compiling should Can correctly carry out during framework.jar bag, then need to be removed by this relating module, in this relating module Having more side operator, removal unit 107 removes this relating module, it is possible to for framework.jar bag Add more method and space is provided.
Wherein, described default bag name unit 108, for utilizing java reflex mechanism for the described pass of removal Gang mould block presets bag name;
Presetting bag name unit 108 utilizes this relating module that java reflex mechanism is removal to preset a bag name.
Wherein, described transmitting element 109, for feeding back to the default bag name of described relating module Framework.jar bag, and the default bag name of described relating module is sent to Java.jar bag In Android.mk so that described Android.mk increases the default bag name of described relating module.
This bag name preset is sent to framework.jar bag, so that passing through by transmitting element 109 When framework.jar bag calls the method in this relating module, just can find this by this default bag name The relating module of removal
The compilation process of Java.jar is system layer compiling, in order to ensure that the compiling of system layer should not by removal The impact of relating module, it is also desirable to the default bag name of this removal module is sent extremely by transmitting element 109 In the Android.mk of Java.jar bag, in order to when system layer calls the goal approach in this relating module, energy Enough with do not move out this relating module before to call result identical so that the compiling of described Java.jar bag is correct Carry out.
To sum up, the embodiment of the present application 2 provides a kind of device calling relating module, also includes in advance From framework.jar bag, remove the removal unit of relating module, preset bag name unit and transmitting element, The default bag name of the relating module of removal is sent in framework.jar bag and Java.jar bag In Android.mk, it is ensured that the method called in the compilation process made with do not move out this relating module before To call result identical.
Embodiment 3
See Fig. 8, it is shown that the structure of a kind of device embodiment 3 calling relating module that the application provides Schematic diagram, in the structure shown in Fig. 5, also includes: alarm unit 110;
Alarm unit, for when not searching target class or when described in the bag at described relating module When target class does not finds goal approach, generate warning message and report to the police.
When not finding target class in the bag of relating module, then explanation is broken down, alarm unit 110 Generation warning message is reported to the police, and programming by prompting personnel break down, and examines the bag Program of relating module Look into, adjust.
In like manner, when not finding goal approach in target class, then explanation is broken down, alarm unit 110 generate warning messages reports to the police, and programming by prompting personnel break down, the program of target class is checked, Adjust.
The mode that warning message is reported to the police can be multiple, such as: generates pop-up and carries out pointing out, generating warning The various modes such as sound prompting, concrete mode can be configured according to practical situation, the most superfluous in the present embodiment State.
To sum up, the embodiment of the present application 3 provides a kind of device calling relating module, also includes: when When not searching target class in the bag of described relating module or when not finding target in described target class During method, generate the alarm unit that warning message is reported to the police.When breaking down, it is ensured that programming personnel can Obtain information, and then the program that this fault occurs checks, adjusts.
Above to a kind of method and apparatus calling relating module provided by the present invention, carry out detailed Jie Continuing, principle and the embodiment of the present invention are set forth by specific case used herein, above reality The explanation executing example is only intended to help to understand method and the core concept thereof of the present invention;Simultaneously for ability The those skilled in the art in territory, according to the thought of the present invention, the most all can Change part.In sum, this specification content should not be construed as limitation of the present invention.

Claims (10)

1. the method calling relating module, it is characterised in that described relating module is to exist in advance The relating module with default bag name of removal in framework.jar bag, the method includes:
According to the default bag name of described relating module, obtain the bag of described relating module, and in described pass Searching target class in the bag of gang mould block, described target class is unappropriated class;
When finding target class, searching goal approach in described target class, described goal approach is not Occupied method;
When finding goal approach in described target class, obtain described goal approach and described target side The method parameter of method;
Utilize java reflex mechanism, described goal approach and method parameter are reflected and calls to framework.jar Bag, so that the compiling of described framework.jar bag is correctly carried out.
Method the most according to claim 1, it is characterised in that described after finding target class, Before searching goal approach in described target class, also include:
Carry out assignment for described target class to take.
Method the most according to claim 1, it is characterised in that when finding in described target class After goal approach, before obtaining the method parameter of described goal approach and described goal approach, also wrap Include:
Take for described goal approach assignment.
Method the most according to claim 1, it is characterised in that in advance in framework.jar bag Removal relating module includes:
When judging to obtain that in framework.jar bag, side operator reaches default higher limit, by described association Module removes;
Described relating module for removal presets bag name, and the default bag name of described relating module is fed back to Framework.jar bag;
The default bag name of described relating module is sent in the Android.mk to Java.jar bag so that Described Android.mk increases the default bag name of described relating module.
Method the most according to claim 1, it is characterised in that also include:
When the bag at described relating module is not searched target class or when not searching in described target class During to goal approach, generate warning message and report to the police.
6. the device calling relating module, it is characterised in that described relating module be in advance from The relating module with default bag name of removal in framework.jar bag, this device includes:
First searches unit, for the default bag name according to described relating module, obtains described pass gang mould The bag of block, and in the bag of described relating module, search target class, described target class is unappropriated class;
Second searches unit, for when finding target class, searches goal approach in described target class, Described goal approach is unappropriated method;
Acquiring unit, in time finding goal approach in described target class, obtains described goal approach And the method parameter of described goal approach;
Reflector element, is used for utilizing java reflex mechanism, described goal approach and method parameter is reflected and adjusts With to framework.jar bag, so that the compiling of described framework.jar bag is correctly carried out.
Device the most according to claim 6, it is characterised in that also include:
Class takies unit, for after finding target class, searches goal approach in described target class Before, carry out assignment for described target class to take.
Device the most according to claim 6, it is characterised in that also include:
Method takies unit, for after finding goal approach in described target class, obtains described Before the method parameter of goal approach and described goal approach, take for described goal approach assignment.
Device the most according to claim 6, it is characterised in that also include:
Removal unit, for when judging that obtaining side operator in framework.jar bag reaches default higher limit Time, described relating module is removed;
Preset bag name unit, for presetting bag name for the described relating module of removal;
Transmitting element, for the default bag name of described relating module is fed back to framework.jar bag, and And the default bag name of described relating module is sent in the Android.mk to Java.jar bag so that institute State Android.mk and increase the default bag name of described relating module.
Device the most according to claim 6, it is characterised in that also include:
Alarm unit, for when not searching target class or when described in the bag at described relating module When target class does not finds goal approach, generate warning message and report to the police.
CN201310577919.2A 2013-11-14 2013-11-14 Method and device for calling correlation module Active CN103645927B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310577919.2A CN103645927B (en) 2013-11-14 2013-11-14 Method and device for calling correlation module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310577919.2A CN103645927B (en) 2013-11-14 2013-11-14 Method and device for calling correlation module

Publications (2)

Publication Number Publication Date
CN103645927A CN103645927A (en) 2014-03-19
CN103645927B true CN103645927B (en) 2017-01-11

Family

ID=50251150

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310577919.2A Active CN103645927B (en) 2013-11-14 2013-11-14 Method and device for calling correlation module

Country Status (1)

Country Link
CN (1) CN103645927B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108572853A (en) * 2018-04-24 2018-09-25 北京奇虎科技有限公司 Interface provision method, device and the computing device of system hidden method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413022A (en) * 2011-12-31 2012-04-11 北京新媒传信科技有限公司 Application debugging method and system
CN103324514A (en) * 2013-06-17 2013-09-25 Tcl通讯(宁波)有限公司 Method and system for separating java archived files

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6980979B2 (en) * 2001-09-19 2005-12-27 Sun Microsystems, Inc. Method and apparatus for customizing Java API implementations

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413022A (en) * 2011-12-31 2012-04-11 北京新媒传信科技有限公司 Application debugging method and system
CN103324514A (en) * 2013-06-17 2013-09-25 Tcl通讯(宁波)有限公司 Method and system for separating java archived files

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于反射机制的轻量级Java持久层框架设计与实现;张秀宏;《中国优秀硕士学位论文全文数据库信息科技辑》;20090415(第04期);全文 *

Also Published As

Publication number Publication date
CN103645927A (en) 2014-03-19

Similar Documents

Publication Publication Date Title
CN102426533B (en) Method and device for installing software
US20140197949A1 (en) Security system having segregated operating software
US20110099428A1 (en) Dynamic fault analysis for a centrally managed network element in a telecommunications system
CN102638715B (en) Remote monitoring method for intelligent television system, related equipment and intelligent television system
RU2009127723A (en) WIRELESS NETWORK RESET METHOD AND SYSTEM AND WIRELESS NETWORK DEVICE
CN104159269A (en) Method, related equipment and system for accessing wireless router
CN103645927B (en) Method and device for calling correlation module
CN103455359A (en) Method, device and system for patch installation
CN103490929B (en) Manufacturing and implement method for multi-adaptive firmware of server
CN103576656A (en) Method, device and system for controlling household appliances
CN105095046A (en) Method and device for task monitoring
CN106327143B (en) Method and apparatus for nodes in a flow
CN112152825B (en) Multi-stage module upgrading method and device for household appliance and electronic equipment
CN105578279A (en) Television alarming method and system
CN103645926B (en) Method and device for calling correlation module
CN112732305A (en) Intelligent device upgrading method and device, mobile terminal, intelligent device and medium
CN103442291A (en) Set top box upgrading method and device
JP2008236527A (en) Trunk transmission device with intra-device warning suppressing function and method thereof
CN102026253B (en) Alarm reporting and processing method, system and equipment
CN104461741A (en) Graphics device interface based computing device optimizing method and device
CN105786570A (en) Method and device for managing starting-up self-starting of program
CN104714856A (en) Software repairing method and terminal equipment
CN105376646B (en) A kind of set top box upgrading program configuration method and device
CN105635781A (en) Processing method and system of request information
CN112116308B (en) Automatic generation method, system and device of operation ticket and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PP01 Preservation of patent right

Effective date of registration: 20170721

Granted publication date: 20170111

PP01 Preservation of patent right
PD01 Discharge of preservation of patent
PD01 Discharge of preservation of patent

Date of cancellation: 20200721

Granted publication date: 20170111

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 300453 Tianjin Binhai New Area, Tianjin Eco-city, No. 126 Animation and Animation Center Road, Area B1, Second Floor 201-427

Patentee after: Xinle Visual Intelligent Electronic Technology (Tianjin) Co.,Ltd.

Address before: 300467 Tianjin Binhai New Area, ecological city, animation Middle Road, building, No. two, B1 District, 201-427

Patentee before: LE SHI ZHI XIN ELECTRONIC TECHNOLOGY (TIANJIN) Ltd.

Address after: Room 301-1, Room 301-3, Area B2, Animation Building, No. 126 Animation Road, Zhongxin Eco-city, Tianjin Binhai New Area, Tianjin

Patentee after: LE SHI ZHI XIN ELECTRONIC TECHNOLOGY (TIANJIN) Ltd.

Address before: 300453 Tianjin Binhai New Area, Tianjin Eco-city, No. 126 Animation and Animation Center Road, Area B1, Second Floor 201-427

Patentee before: Xinle Visual Intelligent Electronic Technology (Tianjin) Co.,Ltd.

PP01 Preservation of patent right
PP01 Preservation of patent right

Effective date of registration: 20210201

Granted publication date: 20170111