# HG changeset patch # User Thinker K.F. Li # Date 1311655584 -28800 # Node ID b2db11aed6b85d170cf972f6baabbbe33bda5311 # Parent 355986e5cfbd6be6f49b9d6b2695abdde98c454f Provide method of insert class definition in DEXFile_linked class. - Gather APIs about linked DEX at DEXFile_linked class to make a focus, and make it easy to be understood and managed. diff -r 355986e5cfbd -r b2db11aed6b8 paraspace/dexfile.py --- a/paraspace/dexfile.py Tue Jul 26 10:06:44 2011 +0800 +++ b/paraspace/dexfile.py Tue Jul 26 12:46:24 2011 +0800 @@ -1732,6 +1732,15 @@ restore_dependencies(unlinked, self._dep_decls) return unlinked + + ## \brief Insert a linked class definition into the DEX file. + def insert_class(self, classdef): + from paraspace.injection import dexfile_insert_class + + assert isinstance(classdef, _DEX_ClassDef) + + clone = dexfile_insert_class(self, classdef) + return clone pass