Package com.android.repository.impl.meta
Class LocalPackageImpl
- java.lang.Object
-
- com.android.repository.impl.meta.RepoPackageImpl
-
- com.android.repository.impl.meta.LocalPackageImpl
-
- All Implemented Interfaces:
LocalPackage,RepoPackage,java.lang.Comparable<RepoPackage>
- Direct Known Subclasses:
LocalPackage,LocalPackage
public abstract class LocalPackageImpl extends RepoPackageImpl implements LocalPackage
Implementation ofLocalPackagethat can be saved and loaded using JAXB.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.android.repository.impl.meta.RepoPackageImpl
RepoPackageImpl.Archives, RepoPackageImpl.Dependencies, RepoPackageImpl.UsesLicense
-
-
Field Summary
-
Fields inherited from interface com.android.repository.api.RepoPackage
PATH_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description LocalPackageImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTo(Repository repo)Adds this package to the givenRepository, overwriting existing packages if necessary.RepoPackageImplasMarshallable()Returns a package with the same content as this one that can be marshalled using JAXB (orthisif it already can be marshalled).static LocalPackageImplcreate(RepoPackage repoPackage)Creates aLocalPackageImplfrom an arbitraryRepoPackage.java.nio.file.PathgetLocation()Gets the installed location of this package.voidsetInstalledPath(java.nio.file.Path path)Specifies the path at which this package is installed.-
Methods inherited from class com.android.repository.impl.meta.RepoPackageImpl
addDependency, compareTo, equals, getAllDependencies, getDependencies, getDisplayName, getLicense, getPath, getRevision, getTypeDetails, getUsesLicense, getVersion, hashCode, isObsolete, obsolete, setDependencies, setDisplayName, setLicense, setObsolete, setPath, setRevision, setTypeDetails, setUsesLicense, setVersion
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.android.repository.api.RepoPackage
createFactory, getAllDependencies, getDisplayName, getLicense, getPath, getTypeDetails, getVersion, obsolete
-
-
-
-
Method Detail
-
getLocation
@NonNull public java.nio.file.Path getLocation()
Description copied from interface:LocalPackageGets the installed location of this package.- Specified by:
getLocationin interfaceLocalPackage
-
setInstalledPath
public void setInstalledPath(@NonNull java.nio.file.Path path)Description copied from interface:LocalPackageSpecifies the path at which this package is installed. This should be called directly after the package is created.- Specified by:
setInstalledPathin interfaceLocalPackage
-
create
@NonNull public static LocalPackageImpl create(@NonNull RepoPackage repoPackage)
Creates aLocalPackageImplfrom an arbitraryRepoPackage. Useful if you have aRepoPackageof unknown concrete type and want to marshal it using JAXB.
-
asMarshallable
@NonNull public RepoPackageImpl asMarshallable()
Description copied from interface:RepoPackageReturns a package with the same content as this one that can be marshalled using JAXB (orthisif it already can be marshalled).- Specified by:
asMarshallablein interfaceRepoPackage
-
addTo
public void addTo(@NonNull Repository repo)Description copied from class:RepoPackageImplAdds this package to the givenRepository, overwriting existing packages if necessary.- Specified by:
addToin classRepoPackageImpl
-
-