BuildInfo
public
class
BuildInfo
extends Object
implements
IBuildInfo
java.lang.Object | |
↳ | com.android.tradefed.build.BuildInfo |
Cách triển khai chung của IBuildInfo
cần được liên kết với ITestDevice
.
Tóm tắt
Hàm khởi tạo công khai | |
---|---|
BuildInfo()
Tạo |
|
BuildInfo(String buildId, String buildTargetName)
Tạo một |
Phương thức công khai | |
---|---|
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)
Sao chép tất cả |
boolean
|
equals(Object obj)
|
static
IBuildInfo
|
fromProto(BuildInformation.BuildInfo protoBuild)
Thao tác nghịch đảo với |
|
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()
|
Phương thức được bảo vệ | |
---|---|
void
|
addAllBuildAttributes(BuildInfo build)
Phương thức trợ giúp để sao chép các thuộc tính bản dựng, nhánh và phiên bản của bản dựng khác. |
void
|
addAllFiles(BuildInfo build)
Phương thức trợ giúp để sao chép tất cả tệp từ bản dựng khác. |
boolean
|
applyBuildProperties(VersionedFile origFileConsidered, IBuildInfo build, IBuildInfo receiver)
Cho phép áp dụng một số |
MultiMap<String, String>
|
getAttributesMultiMap()
|
|
getVersionedFileMap()
|
MultiMap<String, VersionedFile>
|
getVersionedFileMapFull()
|
Hàm khởi tạo công khai
BuildInfo
public BuildInfo (String buildId, String buildTargetName)
Tạo một BuildInfo
Tham số | |
---|---|
buildId |
String : mã bản dựng |
buildTargetName |
String : tên mục tiêu bản dựng
|
Phương thức công khai
addAppPackageFile
public void addAppPackageFile (File appPackageFile, String version)
Tham số | |
---|---|
appPackageFile |
File |
version |
String |
addBuildAttribute
public void addBuildAttribute (String attributeName, String attributeValue)
Tham số | |
---|---|
attributeName |
String |
attributeValue |
String |
addBuildAttributes
public void addBuildAttributes (buildAttributes)
Tham số | |
---|---|
buildAttributes |
|
cleanUp
public void cleanUp ()
cleanUp
public void cleanUp (doNotClean)
Tham số | |
---|---|
doNotClean |
|
nhân bản
public IBuildInfo clone ()
Giá trị trả về | |
---|---|
IBuildInfo |
copyAllFileFrom
public final void copyAllFileFrom (BuildInfo build)
Sao chép tất cả VersionedFile
từ một bản dựng nhất định vào bản dựng này.
Tham số | |
---|---|
build |
BuildInfo |
bằng
public boolean equals (Object obj)
Tham số | |
---|---|
obj |
Object |
Giá trị trả về | |
---|---|
boolean |
fromProto
public static IBuildInfo fromProto (BuildInformation.BuildInfo protoBuild)
Thao tác nghịch đảo với toProto()
để lấy lại thực thể.
Tham số | |
---|---|
protoBuild |
BuildInformation.BuildInfo |
Giá trị trả về | |
---|---|
IBuildInfo |
getAppPackageFiles
publicgetAppPackageFiles ()
Giá trị trả về | |
---|---|
|
getBuildAttributes
publicgetBuildAttributes ()
Giá trị trả về | |
---|---|
|
getBuildBranch
public String getBuildBranch ()
Giá trị trả về | |
---|---|
String |
getBuildFlavor
public String getBuildFlavor ()
Giá trị trả về | |
---|---|
String |
getBuildId
public String getBuildId ()
Giá trị trả về | |
---|---|
String |
getBuildTargetName
public String getBuildTargetName ()
Giá trị trả về | |
---|---|
String |
getDeviceSerial
public String getDeviceSerial ()
Giá trị trả về | |
---|---|
String |
getFile
public File getFile (String name)
Tham số | |
---|---|
name |
String |
Giá trị trả về | |
---|---|
File |
getFile
public File getFile (BuildInfoKey.BuildInfoFileKey key)
Tham số | |
---|---|
key |
BuildInfoKey.BuildInfoFileKey |
Giá trị trả về | |
---|---|
File |
getFiles
publicgetFiles ()
Giá trị trả về | |
---|---|
|
getProperties
publicgetProperties ()
Giá trị trả về | |
---|---|
|
getRemoteFiles
publicgetRemoteFiles ()
Giá trị trả về | |
---|---|
|
getTestTag
public String getTestTag ()
Giá trị trả về | |
---|---|
String |
getVersion
public String getVersion (BuildInfoKey.BuildInfoFileKey key)
Tham số | |
---|---|
key |
BuildInfoKey.BuildInfoFileKey |
Giá trị trả về | |
---|---|
String |
getVersion
public String getVersion (String name)
Tham số | |
---|---|
name |
String |
Giá trị trả về | |
---|---|
String |
getVersionedFile
public VersionedFile getVersionedFile (BuildInfoKey.BuildInfoFileKey key)
Tham số | |
---|---|
key |
BuildInfoKey.BuildInfoFileKey |
Giá trị trả về | |
---|---|
VersionedFile |
getVersionedFile
public final VersionedFile getVersionedFile (String name)
Tham số | |
---|---|
name |
String |
Giá trị trả về | |
---|---|
VersionedFile |
getVersionedFileKeys
publicgetVersionedFileKeys ()
Giá trị trả về | |
---|---|
|
getVersionedFiles
public finalgetVersionedFiles (BuildInfoKey.BuildInfoFileKey key)
Tham số | |
---|---|
key |
BuildInfoKey.BuildInfoFileKey |
Giá trị trả về | |
---|---|
|
hashCode
public int hashCode ()
Giá trị trả về | |
---|---|
int |
removeBuildAttribute
public void removeBuildAttribute (String attributeName)
Tham số | |
---|---|
attributeName |
String |
setBuildBranch
public void setBuildBranch (String branch)
Tham số | |
---|---|
branch |
String |
setBuildFlavor
public void setBuildFlavor (String buildFlavor)
Tham số | |
---|---|
buildFlavor |
String |
setBuildId
public void setBuildId (String buildId)
Tham số | |
---|---|
buildId |
String |
setDeviceSerial
public void setDeviceSerial (String serial)
Tham số | |
---|---|
serial |
String |
setFile
public void setFile (String name, File file, String version)
Tham số | |
---|---|
name |
String |
file |
File |
version |
String |
setFile
public void setFile (BuildInfoKey.BuildInfoFileKey key, File file, String version)
Tham số | |
---|---|
key |
BuildInfoKey.BuildInfoFileKey |
file |
File |
version |
String |
setProperties
public void setProperties (BuildInfoProperties... properties)
Tham số | |
---|---|
properties |
BuildInfoProperties |
setTestTag
public void setTestTag (String testTag)
Tham số | |
---|---|
testTag |
String |
stageRemoteFile
public File stageRemoteFile (String fileName, File workingDir)
Tham số | |
---|---|
fileName |
String |
workingDir |
File |
Giá trị trả về | |
---|---|
File |
toProto
public BuildInformation.BuildInfo toProto ()
Giá trị trả về | |
---|---|
BuildInformation.BuildInfo |
toString
public String toString ()
Giá trị trả về | |
---|---|
String |
Phương thức được bảo vệ
addAllBuildAttributes
protected void addAllBuildAttributes (BuildInfo build)
Phương thức trợ giúp để sao chép các thuộc tính bản dựng, nhánh và phiên bản của bản dựng khác.
Tham số | |
---|---|
build |
BuildInfo |
addAllFiles
protected void addAllFiles (BuildInfo build)
Phương thức trợ giúp để sao chép tất cả tệp từ bản dựng khác.
Tạo đường liên kết cứng mới đến các tệp để mỗi bản dựng sẽ có một đường dẫn tệp duy nhất đến tệp đó.
Tham số | |
---|---|
build |
BuildInfo |
Gửi | |
---|---|
|
nếu một ngoại lệ được gửi khi tạo đường liên kết cứng. |
applyBuildProperties
protected boolean applyBuildProperties (VersionedFile origFileConsidered, IBuildInfo build, IBuildInfo receiver)
Cho phép áp dụng một số IBuildInfo.BuildInfoProperties
và có thể xử lý theo cách khác.
Tham số | |
---|---|
origFileConsidered |
VersionedFile : VersionedFile đang được xem. |
build |
IBuildInfo : bản dựng gốc đang được sao chép |
receiver |
IBuildInfo : bản dựng nhận thông tin. |
Giá trị trả về | |
---|---|
boolean |
Đúng nếu chúng ta đã áp dụng các thuộc tính và bỏ qua việc xử lý thêm. Nếu không thì giá trị sẽ là false. |
getAttributesMultiMap
protected MultiMap<String, String> getAttributesMultiMap ()
Giá trị trả về | |
---|---|
MultiMap<String, String> |
getVersionedFileMap
protectedgetVersionedFileMap ()
Giá trị trả về | |
---|---|
|
getVersionedFileMapFull
protected MultiMap<String, VersionedFile> getVersionedFileMapFull ()
Giá trị trả về | |
---|---|
MultiMap<String, VersionedFile> |