Mercurial > paraspace
diff paraspace/dexfile.py @ 119:4f508f84c8a1
Add inject_redir.py example
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Fri, 05 Aug 2011 14:39:32 +0800 |
parents | c5f59bdbc916 |
children | c7a5de2d2334 |
line wrap: on
line diff
--- a/paraspace/dexfile.py Thu Aug 04 21:57:22 2011 +0800 +++ b/paraspace/dexfile.py Fri Aug 05 14:39:32 2011 +0800 @@ -464,7 +464,7 @@ pass @staticmethod - def to_str(): + def to_str(child): return '' def get_value(self, parents): @@ -1682,6 +1682,11 @@ pass ## \brief Factory function to return a DEXFile_linked of given DEXFile. + # + # \param dex is a DEXFile instance. + # \param dep_decls is a dictionary returned by prepare_dep_decls(). + # \return a DEXFile_linked. + # @staticmethod def build_dependencies(dex, dep_decls): from paraspace.dex_deptracker import build_dependencies @@ -1719,6 +1724,13 @@ return typeid pass pass + + ## \brief Get index of given _DEX_ClassDef. + def get_idx_classdef(self, classdef): + from paraspace.dexfile import _DEX_ClassDef + assert isinstance(classdef, _DEX_ClassDef) + typeidx = self.get_idx_typeid(classdef.classIdx) + return typeidx ## \brief Return type ID item with given index. def find_typeid_idx(self, idx):