|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.repository.testframework.FakePackage
public class FakePackage
A fake RepoPackage (implementing both LocalPackage and RemotePackage,
for use in unit tests.
Currently not especially fully-featured.
| Field Summary |
|---|
| Fields inherited from interface com.android.repository.api.RepoPackage |
|---|
PATH_SEPARATOR |
| Constructor Summary | |
|---|---|
FakePackage(java.lang.String path,
Revision version,
java.util.Collection<Dependency> dependencies)
|
|
| Method Summary | |
|---|---|
int |
compareTo(RepoPackage o)
|
CommonFactory |
createFactory()
Creates a CommonFactory corresponding to the SchemaModule.SchemaModuleVersion
of this instance. |
boolean |
equals(java.lang.Object obj)
|
java.util.Collection<Dependency> |
getAllDependencies()
Gets information on what versions of what packages this package depends on. |
Archive |
getArchive()
|
Channel |
getChannel()
Gets the update channel (e.g. |
java.lang.String |
getDisplayName()
Gets the user-friendly name of this package. |
License |
getLicense()
Gets the License, if any, associated with this package. |
java.io.File |
getLocation()
Gets the installed location of this package. |
java.lang.String |
getPath()
The install path (which also serves as unique id) for this package. |
RepositorySource |
getSource()
|
TypeDetails |
getTypeDetails()
Gets the TypeDetails for this package. |
Revision |
getVersion()
Gets the Revision of this package. |
int |
hashCode()
|
boolean |
obsolete()
Whether this package is obsolete. |
void |
setChannel(Channel channel)
|
void |
setCompleteUrl(java.lang.String url)
|
void |
setInstalledPath(java.io.File root)
Specifies the path at which this package is installed. |
void |
setSource(RepositorySource source)
|
void |
setTypeDetails(TypeDetails details)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FakePackage(java.lang.String path,
Revision version,
java.util.Collection<Dependency> dependencies)
| Method Detail |
|---|
@NonNull public RepositorySource getSource()
getSource in interface RemotePackageRepositorySource from which we got this package.
public void setSource(@NonNull
RepositorySource source)
setSource in interface RemotePackagesource - The RepositorySource from which we got this package.@Nullable public Archive getArchive()
getArchive in interface RemotePackagenull if there is none.public void setCompleteUrl(java.lang.String url)
public void setChannel(Channel channel)
@NonNull public Channel getChannel()
RemotePackage
getChannel in interface RemotePackagepublic void setTypeDetails(TypeDetails details)
@NonNull public TypeDetails getTypeDetails()
RepoPackageTypeDetails for this package.
getTypeDetails in interface RepoPackage@NonNull public Revision getVersion()
RepoPackageRevision of this package.
getVersion in interface RepoPackage@NonNull public java.lang.String getDisplayName()
RepoPackage
getDisplayName in interface RepoPackage@Nullable public License getLicense()
RepoPackageLicense, if any, associated with this package.
getLicense in interface RepoPackage@NonNull public java.util.Collection<Dependency> getAllDependencies()
RepoPackage
getAllDependencies in interface RepoPackage@NonNull public java.lang.String getPath()
RepoPackage
getPath in interface RepoPackagepublic boolean obsolete()
RepoPackage
obsolete in interface RepoPackage@NonNull public CommonFactory createFactory()
RepoPackageCommonFactory corresponding to the SchemaModule.SchemaModuleVersion
of this instance.
createFactory in interface RepoPackage
public int compareTo(@NonNull
RepoPackage o)
compareTo in interface java.lang.Comparable<RepoPackage>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object@NonNull public java.io.File getLocation()
LocalPackage
getLocation in interface LocalPackage
public void setInstalledPath(@NonNull
java.io.File root)
LocalPackage
setInstalledPath in interface LocalPackagepublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||