ExecutionFiles

public class ExecutionFiles
extends Object

java.lang.Object
   ↳ com.android.tradefed.invoker.ExecutionFiles


Files dependencies generated during the execution of a test or invocation that need to be carried for testing. This object is shared by all the invocation (tests, modules, etc.).

Summary

Nested classes

enum ExecutionFiles.FilesKey

Enumeration of known standard key for the map. 

Public methods

void clearFiles()

Delete all the files that are tracked and not marked as 'should not delete'.

boolean containsKey(String key)

Returns true if this map contains a mapping for the specified key.

File get(ExecutionFiles.FilesKey key)

Variation of get(String) with a known key.

File get(String key)

Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.

ImmutableMap<String, File> getAll()

Returns all the properties in a copy of the map

boolean isEmpty()

Returns whether or not the map of properties is empty.

File put(ExecutionFiles.FilesKey key, File value)

Variation of put(String, File) with a known key.

File put(ExecutionFiles.FilesKey key, File value, boolean shouldNotDelete)

Variation of put(com.android.tradefed.invoker.ExecutionFiles.FilesKey, File) with option to prevent the file from being deleted at the end of the invocation.

File put(String key, File value)

Associates the specified value with the specified key in this map.

ExecutionFiles putAll( properties)

Copies all of the mappings from the specified map to this map.

File putIfAbsent(String key, File value)

If the specified key is not already associated with a value, associates it with the given value.

File remove(String key)

Removes the mapping for a key from this map if it is present (optional operation).

Public methods

clearFiles

public void clearFiles ()

Delete all the files that are tracked and not marked as 'should not delete'.

containsKey

public boolean containsKey (String key)

Returns true if this map contains a mapping for the specified key.

Parameters
key String: key whose presence in this map is to be tested

Returns
boolean true if this map contains a mapping for the specified key

get

public File get (ExecutionFiles.FilesKey key)

Variation of get(String) with a known key.

Parameters
key ExecutionFiles.FilesKey: the key whose associated value is to be returned

Returns
File the value to which the specified key is mapped, or null if this map contains no mapping for the key

get

public File get (String key)

Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.

Parameters
key String: the key whose associated value is to be returned

Returns
File the value to which the specified key is mapped, or null if this map contains no mapping for the key

getAll

public ImmutableMap<String, File> getAll ()

Returns all the properties in a copy of the map

Returns
ImmutableMap<String, File>

isEmpty

public boolean isEmpty ()

Returns whether or not the map of properties is empty.

Returns
boolean

put

public File put (ExecutionFiles.FilesKey key, 
                File value)

Variation of put(String, File) with a known key.

Parameters
key ExecutionFiles.FilesKey: key with which the specified value is to be associated

value File: value to be associated with the specified key

Returns
File the previous value associated with key, or null if there was no mapping for key.

put

public File put (ExecutionFiles.FilesKey key, 
                File value, 
                boolean shouldNotDelete)

Variation of put(com.android.tradefed.invoker.ExecutionFiles.FilesKey, File) with option to prevent the file from being deleted at the end of the invocation.

Parameters
key ExecutionFiles.FilesKey: key with which the specified value is to be associated

value File: value to be associated with the specified key

shouldNotDelete boolean: prevent the file from being deleted at the end of invocation.

Returns
File the previous value associated with key, or null if there was no mapping for key.

put

public File put (String key, 
                File value)

Associates the specified value with the specified key in this map.

Parameters
key String: key with which the specified value is to be associated

value File: value to be associated with the specified key

Returns
File the previous value associated with key, or null if there was no mapping for key.

putAll

public ExecutionFiles putAll ( properties)

Copies all of the mappings from the specified map to this map.

Parameters
properties : mappings to be stored in this map

Returns
ExecutionFiles The final mapping

putIfAbsent

public File putIfAbsent (String key, 
                File value)

If the specified key is not already associated with a value, associates it with the given value.

Parameters
key String: key with which the specified value is to be associated

value File: value to be associated with the specified key

Returns
File the previous value associated with the specified key, or null if there was no mapping for the key.

remove

public File remove (String key)

Removes the mapping for a key from this map if it is present (optional operation).

Parameters
key String: key whose mapping is to be removed from the map

Returns
File the previous value associated with key, or null if there was no mapping for key.