成員
DebugPackageInfo
DebugPackageInfo DebugPackageInfo(target_label, stripped_file=None, unstripped_file, dwp_file=None)
DebugPackageInfo
建構函式。
參數
參數 | 說明 |
---|---|
target_label
|
必填 *_二進位檔目標的標籤 |
stripped_file
|
File; or None ;
default = None移除的檔案 (明確的「.stripped」目標) |
unstripped_file
|
必要 未移除的檔案 (預設的執行檔目標)。 |
dwp_file
|
File; or None ;
default = None.dwp 檔案 (適用於 fission 版本) 或 null if --fission=no。 |
dwp_file
File DebugPackageInfo.dwp_file傳回 .dwp 檔案 (適用於 fission 版本) 或空值 (如果 --fission=no)。 可能會傳回
None
。
stripped_file
File DebugPackageInfo.stripped_file傳回移除的檔案 (明確的「.stripped」目標)。 可能會傳回
None
。target_label
Label DebugPackageInfo.target_label傳回 *_binary 目標的標籤
to_json
string DebugPackageInfo.to_json()已淘汰。這個 API 已淘汰,並將在近期內移除。請勿完全仰賴它。
---incompatible_struct_has_no_methods
已停用這項功能。使用此旗標確認您的程式碼是否與即將移除的程式碼相容。透過結構參數建立 JSON 字串。只有在所有結構元素 (遞迴) 是字串、整數、布林值、其他結構體、這些型別清單,或是含有這些類型字串鍵和值的字典時,才能使用此方法。字串中的引號和新行會逸出。範例:
struct(key=123).to_json() # {"key":123} struct(key=True).to_json() # {"key":true} struct(key=[1, 2, 3]).to_json() # {"key":[1,2,3]} struct(key='text').to_json() # {"key":"text"} struct(key=struct(inner_key='text')).to_json() # {"key":{"inner_key":"text"}} struct(key=[struct(inner_key=1), struct(inner_key=2)]).to_json() # {"key":[{"inner_key":1},{"inner_key":2}]} struct(key=struct(inner_key=struct(inner_inner_key='text'))).to_json() # {"key":{"inner_key":{"inner_inner_key":"text"}}}。
已淘汰:請改用 json.encode(x) 或 json.encode_indent(x)。這適用於結構體以外的值,不會影響結構欄位命名空間。
to_proto
string DebugPackageInfo.to_proto()已淘汰。這個 API 已淘汰,並將在近期內移除。請勿完全仰賴它。
---incompatible_struct_has_no_methods
已停用這項功能。使用此旗標確認您的程式碼是否與即將移除的程式碼相容。透過 struct 參數建立簡訊。只有在所有結構元素 (遞迴) 是字串、整數、布林值、其他結構體、字典或這些類型的清單時,才能使用此方法。字串中的引號和新行會逸出。結構鍵會依排序順序疊代。範例:
struct(key=123).to_proto() # key: 123 struct(key=True).to_proto() # key: true struct(key=[1, 2, 3]).to_proto() # key: 1 # key: 2 # key: 3 struct(key='text').to_proto() # key: "text" struct(key=struct(inner_key='text')).to_proto() # key { # inner_key: "text" # } struct(key=[struct(inner_key=1), struct(inner_key=2)]).to_proto() # key { # inner_key: 1 # } # key { # inner_key: 2 # } struct(key=struct(inner_key=struct(inner_inner_key='text'))).to_proto() # key { # inner_key { # inner_inner_key: "text" # } # } struct(foo={4: 3, 2: 1}).to_proto() # foo: { # key: 4 # value: 3 # } # foo: { # key: 2 # value: 1 # }
已淘汰:請改用 proto.encode_text(x)。
unstripped_file
File DebugPackageInfo.unstripped_file傳回未移除的檔案 (預設的執行檔目標)