BuildInfo
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)
將特定版本中的所有 |
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)
輔助方法,用於從其他版本複製建構屬性、分支和子類。 |
void
|
addAllFiles(BuildInfo build)
輔助方法,用於複製其他版本中的所有檔案。 |
boolean
|
applyBuildProperties(VersionedFile origFileConsidered, IBuildInfo build, IBuildInfo receiver)
允許套用部分 |
MultiMap<String, String>
|
getAttributesMultiMap()
|
|
getVersionedFileMap()
|
MultiMap<String, VersionedFile>
|
getVersionedFileMapFull()
|
公用建構函式
BuildInfo
public BuildInfo (String buildId, String buildTargetName)
建立 BuildInfo
參數 | |
---|---|
buildId |
String :版本 ID |
buildTargetName |
String :建構目標名稱 |
公用方法
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)
將特定版本中的所有 VersionedFile
複製到這個版本。
參數 | |
---|---|
build |
BuildInfo |
等於
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 |
BuildInfo |
addAllFiles
protected void addAllFiles (BuildInfo build)
輔助方法,用於複製其他版本中的所有檔案。
建立檔案的新硬連結,讓每個版本都有檔案的專屬檔案路徑。
參數 | |
---|---|
build |
BuildInfo |
擲回 | |
---|---|
|
如果在建立硬連結時擲回例外狀況。 |
applyBuildProperties
protected boolean applyBuildProperties (VersionedFile origFileConsidered, IBuildInfo build, IBuildInfo receiver)
允許套用部分 IBuildInfo.BuildInfoProperties
,並可能執行其他處理方式。
參數 | |
---|---|
origFileConsidered |
VersionedFile :目前正在查看的 VersionedFile 。 |
build |
IBuildInfo :要複製的原始版本 |
receiver |
IBuildInfo :接收資訊的版本。 |
傳回 | |
---|---|
boolean |
如果已套用屬性,且應略過後續處理,則為 True。否則為 False。 |
getAttributesMultiMap
protected MultiMap<String, String> getAttributesMultiMap ()
傳回 | |
---|---|
MultiMap<String, String> |
getVersionedFileMap
protectedgetVersionedFileMap ()
傳回 | |
---|---|
|
getVersionedFileMapFull
protected MultiMap<String, VersionedFile> getVersionedFileMapFull ()
傳回 | |
---|---|
MultiMap<String, VersionedFile> |