|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanger.app.ComponentVersion
public class ComponentVersion
ComponentVersion objects contain versioning information about applications and libraries.
You can obtain a ComponentVersion object by using
Registrar.findComponentVersionByName(java.lang.String) or
Registrar.getComponentVersionList().
Most of the information here is displayed in the System Info screen.
| Field Summary | |
|---|---|
static int |
FLAG_DEVELOPER
Possible value for mPubFlags. |
static int |
FLAG_STICKY
Possible value for mPubFlags. |
static int |
FLAG_TINA
Possible value for mPubFlags. |
int |
mBuildNumber
Build number of the component. |
String |
mName
Name of the component. |
String |
mOrigin
Where this component build originated from. |
int |
mPubFlags
Flags for this component. |
int |
mPubMajor
Major version for this component. |
int |
mPubMinor
Minor version for this component. |
int |
mPubPartner
Partner ID for this component. |
int |
mReqFlags
Required flags for this component. |
int |
mReqMajor
Required major version for this component. |
int |
mReqMinor
Required minor version for this component. |
int |
mReqPartner
Required partner ID for this component. |
int |
mTimestamp
Time the component was built, in Danger GMT time (seconds since January 1, 2000). |
| Constructor Summary | |
|---|---|
ComponentVersion(String name)
Construct a ComponentVersion with the specified name. |
|
| Method Summary | |
|---|---|
String |
getDescription()
Get the description for the component. |
String |
getTimeStamp()
Get the time that the component was built. |
String |
getVersionString(boolean detailed)
Generate a human-readable string describing this version. |
boolean |
satisfies(ComponentVersion child)
Checks to see if this component publishes an API compatible with the API required by <child>. |
void |
set(ComponentVersion cv)
Set this ComponentVersion to be equivalent to the specified ComponentVersion. |
String |
toString()
Get a string including the name, description, mPubPartner, mPubMajor, mPubMinor, mPubFlags,
mReqPartner, mReqMajor, mReqMinor, and mReqFlags. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int mPubFlags
FLAG_DEVELOPER, FLAG_STICKY, FLAG_TINA.
public int mPubPartner
public int mPubMajor
public int mPubMinor
public int mReqFlags
FLAG_DEVELOPER, FLAG_STICKY, FLAG_TINA.
This is not used in satisfies(danger.app.ComponentVersion).
public int mReqPartner
satisfies(danger.app.ComponentVersion).
public int mReqMajor
satisfies(danger.app.ComponentVersion).
public int mReqMinor
satisfies(danger.app.ComponentVersion).
public int mTimestamp
public int mBuildNumber
public String mName
public String mOrigin
public static final int FLAG_DEVELOPER
mPubFlags.
public static final int FLAG_STICKY
mPubFlags.
public static final int FLAG_TINA
mPubFlags.
| Constructor Detail |
|---|
public ComponentVersion(String name)
| Method Detail |
|---|
public boolean satisfies(ComponentVersion child)
child - the component whose "required" field we're checking.
public String getTimeStamp()
public String getDescription()
public void set(ComponentVersion cv)
public String getVersionString(boolean detailed)
"v" + [ hardware-version + ":" ] + major-version + "." + minor-version +
[ "/" + build-version ] [ + optional flags ]
The hardware version is omitted if it's zero. Similarly, the build version is also omitted if it's zero. If this is a developer build, the letter "D" is appended.
An example is "v1.2/43901", for a component with no
hardware version, major version 1, minor version 2, and build version
43901.
detailed - true or false, whether to append package flags to the
string; currently the only extra flags are "S" (sticky) and "-tina"
(a radio-specific flag)
public String toString()
mPubPartner, mPubMajor, mPubMinor, mPubFlags,
mReqPartner, mReqMajor, mReqMinor, and mReqFlags.
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||