Package com.android.repository.impl.meta
Class Archive
- java.lang.Object
-
- com.android.repository.impl.meta.Archive
-
- Direct Known Subclasses:
ArchiveType,ArchiveType
public abstract class Archive extends java.lang.ObjectA downloadable version of aRepoPackage, corresponding to a specific version number, and optionally host OS, host bitness, JVM version or JVM bitness. Includes a complete version of the package (Archive.CompleteType), and optionally binary patches from previous revisions to this one (Archive.PatchType). Primarily a superclass for xjc-generated JAXB-compatible classes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classArchive.ArchiveFileGeneral parent for the actual files referenced in an archive.static classArchive.CompleteTypeParent for xjc-generated classes containing a complete zip of this archive.static classArchive.HostConfigSome of the entries in a repository package get selected based on the values of the current system.static classArchive.PatchesTypeA list ofArchive.PatchTypes.static classArchive.PatchTypeA binary diff from a previous package version to this one.
-
Field Summary
Fields Modifier and Type Field Description static Archive.HostConfigsHostConfigSeeArchive.HostConfigfor more details.
-
Constructor Summary
Constructors Constructor Description Archive()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract CommonFactorycreateFactory()Create aCommonFactorycorresponding to this instance'sSchemaModule.SchemaModuleVersion.java.util.List<Archive.PatchType>getAllPatches()Returns all the version-to-version patches for thisArchive.abstract Archive.CompleteTypegetComplete()Returns the full zip of this package.java.lang.StringgetHostArch()Returns the required host architecture ("x86", "x64", or "aarch64").protected java.lang.IntegergetHostBits()Returns the required host bit size (32 or 64), if any.java.lang.StringgetHostOs()Returns the required host OS ("windows", "linux", "macosx"), if any.java.lang.IntegergetJvmBits()Returns the required JVM bit size (32 or 64), if anyRevisionTypegetMinJvmVersion()Returns the minimum JVM version needed for thisArchive, if any.Archive.PatchTypegetPatch(Revision fromRevision)protected Archive.PatchesTypegetPatches()Returns theArchive.PatchesTypefor this Archive.booleanisCompatible()voidsetComplete(Archive.CompleteType complete)Sets the full zip of this package.voidsetHostBits(java.lang.Integer bits)Sets the required host bit size (32 or 64), if any.voidsetHostOs(java.lang.String os)Sets the required host OS ("windows", "linux", "macosx"), if any.voidsetJvmBits(java.lang.Integer bits)Sets the required JVM bit size (32 or 64), if any.voidsetMinJvmVersion(RevisionType revision)Sets the minimum JVM version needed for thisArchive, if any.protected voidsetPatches(Archive.PatchesType patches)Sets theArchive.PatchesTypefor this Archive.
-
-
-
Field Detail
-
sHostConfig
public static Archive.HostConfig sHostConfig
SeeArchive.HostConfigfor more details. If you ever need to override how a package is parsed, you can re-set this with a new instance, but you should be especially careful not to do so at an inappropriate time, like when a package is mid-parse.
-
-
Method Detail
-
isCompatible
public boolean isCompatible()
- Returns:
trueif this archive is compatible with the current system with respect to the specified host os, bit size, jvm version, and jvm bit size (if any).
-
getComplete
@NonNull public abstract Archive.CompleteType getComplete()
Returns the full zip of this package.
-
setComplete
public void setComplete(@NonNull Archive.CompleteType complete)Sets the full zip of this package.
-
getHostBits
@Nullable protected java.lang.Integer getHostBits()
Returns the required host bit size (32 or 64), if any. This is just for compatibility with v1 schema, you should usegetHostArch().
-
getHostArch
@Nullable public java.lang.String getHostArch()
Returns the required host architecture ("x86", "x64", or "aarch64").
-
setHostBits
public void setHostBits(@Nullable java.lang.Integer bits)Sets the required host bit size (32 or 64), if any.
-
getJvmBits
@Nullable public java.lang.Integer getJvmBits()
Returns the required JVM bit size (32 or 64), if any
-
setJvmBits
public void setJvmBits(@Nullable java.lang.Integer bits)Sets the required JVM bit size (32 or 64), if any.
-
getHostOs
@Nullable public java.lang.String getHostOs()
Returns the required host OS ("windows", "linux", "macosx"), if any.
-
setHostOs
public void setHostOs(@Nullable java.lang.String os)Sets the required host OS ("windows", "linux", "macosx"), if any.
-
getAllPatches
@NonNull public java.util.List<Archive.PatchType> getAllPatches()
Returns all the version-to-version patches for thisArchive.
-
getPatch
@Nullable public Archive.PatchType getPatch(Revision fromRevision)
-
getPatches
@Nullable protected Archive.PatchesType getPatches()
Returns theArchive.PatchesTypefor this Archive. Probably only needed internally.
-
setPatches
protected void setPatches(@Nullable Archive.PatchesType patches)Sets theArchive.PatchesTypefor this Archive. Probably only needed internally.
-
getMinJvmVersion
@Nullable public RevisionType getMinJvmVersion()
Returns the minimum JVM version needed for thisArchive, if any.
-
setMinJvmVersion
public void setMinJvmVersion(@Nullable RevisionType revision)Sets the minimum JVM version needed for thisArchive, if any.
-
createFactory
@NonNull public abstract CommonFactory createFactory()
Create aCommonFactorycorresponding to this instance'sSchemaModule.SchemaModuleVersion.
-
-