#NEWLINE# @ staticmethod #NEWLINE# def from_struct_type( struct_type ) : #NEWLINE# #INDENT# assert isinstance ( struct_type , W_StructType ) #NEWLINE# name = struct_type . name #NEWLINE# init_field_cnt = struct_type . init_field_cnt #NEWLINE# auto_field_cnt = struct_type . auto_field_cnt #NEWLINE# auto_v = struct_type . auto_v #NEWLINE# mutables = [ ] #NEWLINE# prev_idx = 1 #NEWLINE# for i in struct_type . immutables : #NEWLINE# #INDENT# for j in range ( prev_idx , i ) : #NEWLINE# #INDENT# mutables . append ( j ) #NEWLINE# #UNINDENT# prev_idx = ( i + 1 ) #NEWLINE# #UNINDENT# super_key = None #NEWLINE# if ( struct_type . super is not values . w_false ) : #NEWLINE# #INDENT# super_key = W_PrefabKey . from_struct_type ( struct_type . super ) #NEWLINE# #UNINDENT# return W_PrefabKey . make ( name , init_field_cnt , auto_field_cnt , auto_v , i , super_key )