changeset 101:b2db11aed6b8

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.
author Thinker K.F. Li <thinker@codemud.net>
date Tue, 26 Jul 2011 12:46:24 +0800
parents 355986e5cfbd
children 7fcd555d802b
files paraspace/dexfile.py
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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