예제 #1
0
 def from_export_file(cls, export_file):
     CP = export_file.constant_pool
     slf = cls(a2d(export_file.AID),
               str(CP[CP[export_file.this_package].name_index]))
     slf.populate(export_file)
     return slf
예제 #2
0
 def from_export_file(cls, export_file):
     CP = export_file.constant_pool
     slf = cls(a2d(export_file.AID), str(CP[CP[export_file.this_package].name_index]))
     slf.populate(export_file)
     return slf
예제 #3
0
 def impoort(cls, struct):
     """ return a cls type with the content of the JSON string """
     slf = cls(a2d(struct['AID']), struct['name'])
     for token, claass in struct['classes'].iteritems():
         slf.classes[int(token)] = cls.classRefCollection.impoort(claass)
     return slf
예제 #4
0
 def impoort(cls, struct):
     """ return a cls type with the content of the JSON string """
     slf = cls(a2d(struct['AID']), struct['name'])
     for token, claass in struct['classes'].iteritems():
         slf.classes[int(token)] = cls.classRefCollection.impoort(claass)
     return slf