build 信息
public
class
BuildInfo
extends Object
implements
IBuildInfo
| java.lang.Object | |
| ↳ | com.android.tradefed.build.BuildInfo |
应与 ITestDevice 相关联的 IBuildInfo 的通用实现。
摘要
公共构造函数 | |
|---|---|
BuildInfo()
使用默认属性值创建 |
|
BuildInfo(String buildId, String buildTargetName)
创建 |
|
公共方法 | |
|---|---|
void
|
addAppPackageFile(File appPackageFile, String version)
|
void
|
addBuildAttribute(String attributeName, String attributeValue)
|
void
|
addBuildAttributes(
|
void
|
cleanUp()
|
void
|
cleanUp(
|
IBuildInfo
|
clone()
|
final
void
|
copyAllFileFrom(BuildInfo build)
将给定 build 中的所有 |
boolean
|
equals(Object obj)
|
static
IBuildInfo
|
fromProto(BuildInformation.BuildInfo protoBuild)
对 |
|
getAppPackageFiles()
|
|
getBuildAttributes()
|
String
|
getBuildBranch()
|
String
|
getBuildFlavor()
|
String
|
getBuildId()
|
String
|
getBuildTargetName()
|
String
|
getDeviceSerial()
|
File
|
getFile(String name)
|
File
|
getFile(BuildInfoKey.BuildInfoFileKey key)
|
|
getFiles()
|
|
getProperties()
|
|
getRemoteFiles()
|
String
|
getTestTag()
|
String
|
getVersion(BuildInfoKey.BuildInfoFileKey key)
|
String
|
getVersion(String name)
|
VersionedFile
|
getVersionedFile(BuildInfoKey.BuildInfoFileKey key)
|
final
VersionedFile
|
getVersionedFile(String name)
|
|
getVersionedFileKeys()
|
final
|
getVersionedFiles(BuildInfoKey.BuildInfoFileKey key)
|
int
|
hashCode()
|
void
|
removeBuildAttribute(String attributeName)
|
void
|
setBuildBranch(String branch)
|
void
|
setBuildFlavor(String buildFlavor)
|
void
|
setBuildId(String buildId)
|
void
|
setDeviceSerial(String serial)
|
void
|
setFile(String name, File file, String version)
|
void
|
setFile(BuildInfoKey.BuildInfoFileKey key, File file, String version)
|
void
|
setProperties(BuildInfoProperties... properties)
|
void
|
setTestTag(String testTag)
|
File
|
stageRemoteFile(String fileName, File workingDir)
|
BuildInformation.BuildInfo
|
toProto()
|
String
|
toString()
|
受保护的方法 | |
|---|---|
void
|
addAllBuildAttributes(BuildInfo build)
用于从其他 build 复制 build 属性、分支和变种的辅助方法。 |
void
|
addAllFiles(BuildInfo build)
用于从其他 build 复制所有文件的辅助方法。 |
boolean
|
applyBuildProperties(VersionedFile origFileConsidered, IBuildInfo build, IBuildInfo receiver)
允许应用某些 |
MultiMap<String, String>
|
getAttributesMultiMap()
|
|
getVersionedFileMap()
|
MultiMap<String, VersionedFile>
|
getVersionedFileMapFull()
|
公共构造函数
build 信息
public BuildInfo (String buildId,
String buildTargetName)创建 BuildInfo
| 参数 | |
|---|---|
buildId |
String:build ID |
buildTargetName |
String:build 目标名称
|
公共方法
addAppPackageFile
public void addAppPackageFile (File appPackageFile,
String version)
| 参数 | |
|---|---|
appPackageFile |
File |
version |
String |
addBuildAttribute
public void addBuildAttribute (String attributeName,
String attributeValue)
| 参数 | |
|---|---|
attributeName |
String |
attributeValue |
String |
addBuildAttributes
public void addBuildAttributes (buildAttributes)
| 参数 | |
|---|---|
buildAttributes |
|
cleanUp
public void cleanUp ()
cleanUp
public void cleanUp (doNotClean)
| 参数 | |
|---|---|
doNotClean |
|
clone
public IBuildInfo clone ()
| 返回 | |
|---|---|
IBuildInfo |
|
copyAllFileFrom
public final void copyAllFileFrom (BuildInfo build)
将给定 build 中的所有 VersionedFile 复制到此 build 中。
| 参数 | |
|---|---|
build |
BuildInfo |
equals
public boolean equals (Object obj)
| 参数 | |
|---|---|
obj |
Object |
| 返回 | |
|---|---|
boolean |
|
fromProto
public static IBuildInfo fromProto (BuildInformation.BuildInfo protoBuild)
对 toProto() 执行反向操作以恢复实例。
| 参数 | |
|---|---|
protoBuild |
BuildInformation.BuildInfo |
| 返回 | |
|---|---|
IBuildInfo |
|
getAppPackageFiles
publicgetAppPackageFiles ()
| 返回 | |
|---|---|
|
|
getBuildAttributes
publicgetBuildAttributes ()
| 返回 | |
|---|---|
|
|
getBuildBranch
public String getBuildBranch ()
| 返回 | |
|---|---|
String |
|
getBuildFlavor
public String getBuildFlavor ()
| 返回 | |
|---|---|
String |
|
getBuildId
public String getBuildId ()
| 返回 | |
|---|---|
String |
|
getBuildTargetName
public String getBuildTargetName ()
| 返回 | |
|---|---|
String |
|
getDeviceSerial
public String getDeviceSerial ()
| 返回 | |
|---|---|
String |
|
getFile
public File getFile (String name)
| 参数 | |
|---|---|
name |
String |
| 返回 | |
|---|---|
File |
|
getFile
public File getFile (BuildInfoKey.BuildInfoFileKey key)
| 参数 | |
|---|---|
key |
BuildInfoKey.BuildInfoFileKey |
| 返回 | |
|---|---|
File |
|
getFiles
publicgetFiles ()
| 返回 | |
|---|---|
|
|
getProperties
publicgetProperties ()
| 返回 | |
|---|---|
|
|
getRemoteFiles
publicgetRemoteFiles ()
| 返回 | |
|---|---|
|
|
getTestTag
public String getTestTag ()
| 返回 | |
|---|---|
String |
|
getVersion
public String getVersion (BuildInfoKey.BuildInfoFileKey key)
| 参数 | |
|---|---|
key |
BuildInfoKey.BuildInfoFileKey |
| 返回 | |
|---|---|
String |
|
getVersion
public String getVersion (String name)
| 参数 | |
|---|---|
name |
String |
| 返回 | |
|---|---|
String |
|
getVersionedFile
public VersionedFile getVersionedFile (BuildInfoKey.BuildInfoFileKey key)
| 参数 | |
|---|---|
key |
BuildInfoKey.BuildInfoFileKey |
| 返回 | |
|---|---|
VersionedFile |
|
getVersionedFile
public final VersionedFile getVersionedFile (String name)
| 参数 | |
|---|---|
name |
String |
| 返回 | |
|---|---|
VersionedFile |
|
getVersionedFileKeys
publicgetVersionedFileKeys ()
| 返回 | |
|---|---|
|
|
getVersionedFiles
public finalgetVersionedFiles (BuildInfoKey.BuildInfoFileKey key)
| 参数 | |
|---|---|
key |
BuildInfoKey.BuildInfoFileKey |
| 返回 | |
|---|---|
|
|
hashCode
public int hashCode ()
| 返回 | |
|---|---|
int |
|
removeBuildAttribute
public void removeBuildAttribute (String attributeName)
| 参数 | |
|---|---|
attributeName |
String |
setBuildBranch
public void setBuildBranch (String branch)
| 参数 | |
|---|---|
branch |
String |
setBuildFlavor
public void setBuildFlavor (String buildFlavor)
| 参数 | |
|---|---|
buildFlavor |
String |
setBuildId
public void setBuildId (String buildId)
| 参数 | |
|---|---|
buildId |
String |
setDeviceSerial
public void setDeviceSerial (String serial)
| 参数 | |
|---|---|
serial |
String |
setFile
public void setFile (String name,
File file,
String version)
| 参数 | |
|---|---|
name |
String |
file |
File |
version |
String |
setFile
public void setFile (BuildInfoKey.BuildInfoFileKey key,
File file,
String version)
| 参数 | |
|---|---|
key |
BuildInfoKey.BuildInfoFileKey |
file |
File |
version |
String |
setProperties
public void setProperties (BuildInfoProperties... properties)
| 参数 | |
|---|---|
properties |
BuildInfoProperties |
setTestTag
public void setTestTag (String testTag)
| 参数 | |
|---|---|
testTag |
String |
stageRemoteFile
public File stageRemoteFile (String fileName,
File workingDir)
| 参数 | |
|---|---|
fileName |
String |
workingDir |
File |
| 返回 | |
|---|---|
File |
|
toProto
public BuildInformation.BuildInfo toProto ()
| 返回 | |
|---|---|
BuildInformation.BuildInfo |
|
toString
public String toString ()
| 返回 | |
|---|---|
String |
|
受保护的方法
addAllBuildAttributes
protected void addAllBuildAttributes (BuildInfo build)
用于从其他 build 复制 build 属性、分支和变种的辅助方法。
| 参数 | |
|---|---|
build |
BuildInfo |
addAllFiles
protected void addAllFiles (BuildInfo build)
用于从其他 build 复制所有文件的辅助方法。
为文件创建新的硬链接,以便每个 build 都有指向文件的唯一文件路径。
| 参数 | |
|---|---|
build |
BuildInfo |
| 抛出 | |
|---|---|
|
创建硬链接时抛出异常。 |
applyBuildProperties
protected boolean applyBuildProperties (VersionedFile origFileConsidered,
IBuildInfo build,
IBuildInfo receiver)允许应用某些 IBuildInfo.BuildInfoProperties,并可能执行其他处理。
| 参数 | |
|---|---|
origFileConsidered |
VersionedFile:当前查看的 VersionedFile。 |
build |
IBuildInfo:要克隆的原始 build |
receiver |
IBuildInfo:接收信息的 build。 |
| 返回 | |
|---|---|
boolean |
如果我们应用了属性,并且应跳过进一步处理,则为 true。否则为 false。 |
getAttributesMultiMap
protected MultiMap<String, String> getAttributesMultiMap ()
| 返回 | |
|---|---|
MultiMap<String, String> |
|
getVersionedFileMap
protectedgetVersionedFileMap ()
| 返回 | |
|---|---|
|
|
getVersionedFileMapFull
protected MultiMap<String, VersionedFile> getVersionedFileMapFull ()
| 返回 | |
|---|---|
MultiMap<String, VersionedFile> |
|