ExecutionFiles
public
class
ExecutionFiles
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.invoker.ExecutionFiles |
執行測試或執行測試時產生的檔案相依性。此物件會由所有叫用 (測試、模組等) 共用。
摘要
公用方法 | |
|---|---|
void
|
clearFiles()
刪除所有已追蹤且未標示為「不應刪除」的檔案。 |
boolean
|
containsKey(String key)
如果此對應表包含指定索引鍵的對應關係,則會傳回 |
File
|
get(ExecutionFiles.FilesKey key)
使用已知鍵值的 |
File
|
get(String key)
傳回指定鍵對應的值;如果這個對應中沒有鍵的對應項目,則傳回 |
ImmutableMap<String, File>
|
getAll()
傳回地圖副本中的所有屬性 |
boolean
|
isEmpty()
傳回屬性對應是否為空白。 |
File
|
put(ExecutionFiles.FilesKey key, File value)
使用已知鍵值的 |
File
|
put(String key, File value)
將指定值與此對應關係中的指定鍵建立關聯。 |
File
|
put(ExecutionFiles.FilesKey key, File value, boolean shouldNotDelete)
|
ExecutionFiles
|
putAll(ExecutionFiles copyFrom)
將指定對應表中的所有對應項目複製到這個對應表。 |
ExecutionFiles
|
putAll(
將指定對應表中的所有對應項目複製到這個對應表。 |
File
|
putIfAbsent(String key, File value)
如果指定的鍵尚未與值建立關聯,請將該鍵與指定的值建立關聯。 |
File
|
remove(String key)
從這個映射表中移除鍵的對應關係 (選用作業)。 |
公用方法
clearFiles
public void clearFiles ()
刪除所有已追蹤且未標示為「不應刪除」的檔案。
containsKey
public boolean containsKey (String key)
如果此對應表包含指定索引鍵的對應關係,就會傳回 true。
| 參數 | |
|---|---|
key |
String:要測試此對應鍵是否存在於此對應圖中 |
| 傳回 | |
|---|---|
boolean |
true:如果這個地圖包含指定鍵的對應關係 |
get
public File get (ExecutionFiles.FilesKey key)
使用已知鍵的 get(String) 變化版本。
| 參數 | |
|---|---|
key |
ExecutionFiles.FilesKey:要傳回關聯值的鍵 |
| 傳回 | |
|---|---|
File |
指定鍵對應的值;如果此對應表中沒有鍵的對應關係,則傳回 null |
get
public File get (String key)
傳回指定鍵對應的值;如果該鍵沒有對應關係,則傳回 null。
| 參數 | |
|---|---|
key |
String:要傳回關聯值的鍵 |
| 傳回 | |
|---|---|
File |
指定鍵對應的值;如果此對應表中沒有鍵的對應關係,則傳回 null |
getAll
public ImmutableMap<String, File> getAll ()
傳回地圖副本中的所有屬性
| 傳回 | |
|---|---|
ImmutableMap<String, File> |
|
isEmpty
public boolean isEmpty ()
傳回屬性對應是否為空白。
| 傳回 | |
|---|---|
boolean |
|
聯繫
public File put (ExecutionFiles.FilesKey key, File value)
使用已知鍵的 put(String, File) 變化版本。
| 參數 | |
|---|---|
key |
ExecutionFiles.FilesKey:要與指定值建立關聯的鍵 |
value |
File:要與指定鍵建立關聯的值 |
| 傳回 | |
|---|---|
File |
與 key 相關聯的前一個值;如果 key 沒有對應關係,則為 null。 |
聯繫
public File put (String key,
File value)將指定值與此對應關係中的指定鍵建立關聯。
| 參數 | |
|---|---|
key |
String:要與指定值建立關聯的鍵 |
value |
File:要與指定鍵建立關聯的值 |
| 傳回 | |
|---|---|
File |
與 key 相關聯的前一個值;如果 key 沒有對應關係,則為 null。 |
另請參閱:
聯繫
public File put (ExecutionFiles.FilesKey key, File value, boolean shouldNotDelete)
put(com.android.tradefed.invoker.ExecutionFiles.FilesKey, File) 的變化版本,可選擇在叫用結束時避免刪除檔案。
| 參數 | |
|---|---|
key |
ExecutionFiles.FilesKey:要與指定值建立關聯的鍵 |
value |
File:要與指定鍵建立關聯的值 |
shouldNotDelete |
boolean:避免檔案在叫用結束時遭到刪除。 |
| 傳回 | |
|---|---|
File |
與 key 相關聯的前一個值;如果 key 沒有對應關係,則為 null。 |
putAll
public ExecutionFiles putAll (ExecutionFiles copyFrom)
將指定地圖中的所有對應項目複製到這個地圖。
| 參數 | |
|---|---|
copyFrom |
ExecutionFiles:要複製的來源 ExecutionFiles。 |
| 傳回 | |
|---|---|
ExecutionFiles |
最終對應 |
putAll
public ExecutionFiles putAll (properties)
將指定地圖中的所有對應項目複製到這個地圖。
| 參數 | |
|---|---|
properties |
:要儲存在這個對應表中的對應項目 |
| 傳回 | |
|---|---|
ExecutionFiles |
最終對應 |
putIfAbsent
public File putIfAbsent (String key,
File value)如果指定的鍵尚未與值建立關聯,則會將其與指定的值建立關聯。
| 參數 | |
|---|---|
key |
String:要與指定值建立關聯的鍵 |
value |
File:要與指定鍵建立關聯的值 |
| 傳回 | |
|---|---|
File |
與指定鍵相關聯的前一個值;如果該鍵沒有對應關係,則傳回 null。 |
移除
public File remove (String key)
從這個對應表中移除鍵的對應關係 (選用作業)。
| 參數 | |
|---|---|
key |
String:要從對應關係中移除的鍵 |
| 傳回 | |
|---|---|
File |
與 key 相關聯的前一個值;如果 key 沒有對應關係,則為 null。 |