|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.android.sdklib.repository.local.LocalPkgInfo
public abstract class LocalPkgInfo
Information about a locally installed package.
Local package information is retrieved via theLocalSdk
object.
Clients should not need to create instances of LocalPkgInfo
directly.
Instead please use the LocalSdk
methods to parse and retrieve packages.
These objects can also contain optional information about updates available
from remote servers. These are computed and set by the RemoteSdk
object.
Constructor Summary | |
---|---|
protected |
LocalPkgInfo(LocalSdk localSdk,
java.io.File localDir,
java.util.Properties sourceProps)
|
Method Summary | |
---|---|
int |
compareTo(LocalPkgInfo o)
Comparison is solely done based on the IPkgDesc . |
boolean |
equals(java.lang.Object obj)
Computes object equality to this instance based on the underlying IPkgDesc but also specific local properties such a local directory,
update available and actual source properties. |
abstract IPkgDesc |
getDesc()
Returns the IPkgDesc describing this package. |
java.lang.String |
getListDescription()
|
java.lang.String |
getLoadError()
|
java.io.File |
getLocalDir()
|
LocalSdk |
getLocalSdk()
|
com.android.sdklib.internal.repository.packages.Package |
getPackage()
|
java.util.Properties |
getSourceProperties()
|
RemotePkgInfo |
getUpdate()
Returns a RemotePkgInfo that can update this package, if available. |
int |
hashCode()
Computes a hash code specific to this instance based on the underlying IPkgDesc but also specific local properties such a local directory,
update available and actual source properties. |
boolean |
hasLoadError()
A "broken" package is installed but is not fully operational. |
boolean |
hasUpdate()
Indicates whether this local package has an update available. |
java.lang.String |
toString()
String representation for debugging purposes. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected LocalPkgInfo(@NonNull LocalSdk localSdk, @NonNull java.io.File localDir, @NonNull java.util.Properties sourceProps)
Method Detail |
---|
@NonNull public LocalSdk getLocalSdk()
@NonNull public java.io.File getLocalDir()
@NonNull public java.util.Properties getSourceProperties()
@Nullable public java.lang.String getLoadError()
public boolean hasUpdate()
Update
has been used to decorate the packages.
getUpdate()
would return a non-null RemotePkgInfo
.@Nullable public RemotePkgInfo getUpdate()
RemotePkgInfo
that can update this package, if available.
This is only defined if Update
has been used to decorate the packages.
RemotePkgInfo
or null.@NonNull public abstract IPkgDesc getDesc()
IPkgDesc
describing this package.
public int compareTo(@NonNull LocalPkgInfo o)
IPkgDesc
.
Other local attributes (local directory, source properties, updates available)
are not used in the comparison. Consequently compareTo(LocalPkgInfo)
does not match equals(Object)
and the hashCode()
properties.
compareTo
in interface java.lang.Comparable<LocalPkgInfo>
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
IPkgDesc
but also specific local properties such a local directory,
update available and actual source properties.
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
IPkgDesc
but also specific local properties such a local directory,
update available and actual source properties. This is different from
the behavioe of compareTo(LocalPkgInfo)
which only uses the
IPkgDesc
for ordering.
equals
in class java.lang.Object
public boolean hasLoadError()
@Nullable public com.android.sdklib.internal.repository.packages.Package getPackage()
@NonNull public java.lang.String getListDescription()
getListDescription
in interface com.android.sdklib.internal.repository.IListDescription
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |