|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.sdklib.internal.repository.LocalSdkParser
public class LocalSdkParser
Scans a local SDK to find which packages are currently installed.
| Field Summary | |
|---|---|
static int |
PARSE_ADDONS
Equivalent to parsing the SDK/addons folder but does so by using the valid targets loaded by the SdkManager. |
static int |
PARSE_ALL
Parse all SDK folders. |
static int |
PARSE_BUILD_TOOLS
Parse the SDK/build-tools folder. |
static int |
PARSE_DOCS
Parse the SDK/docs folder. |
static int |
PARSE_EXTRAS
Parse the SDK/extras folder. |
static int |
PARSE_PLATFORM_TOOLS
Parse the SDK/platform-tools folder |
static int |
PARSE_PLATFORMS
Equivalent to parsing the SDK/platforms folder but does so by using the valid targets loaded by the SdkManager. |
static int |
PARSE_SAMPLES
Parse the SDK/samples folder. |
static int |
PARSE_SOURCES
Parse the SDK/sources folder. |
static int |
PARSE_TOOLS
Parse the SDK/tools folder. |
| Constructor Summary | |
|---|---|
LocalSdkParser()
|
|
| Method Summary | |
|---|---|
void |
clearPackages()
Clear the internal packages list. |
Package[] |
getPackages()
Returns the packages found by the last call to parseSdk(java.lang.String, com.android.sdklib.SdkManager, com.android.sdklib.internal.repository.ITaskMonitor). |
Package[] |
parseSdk(java.lang.String osSdkRoot,
SdkManager sdkManager,
int parseFilter,
ITaskMonitor monitor)
Scan the give SDK to find all the packages already installed at this location. |
Package[] |
parseSdk(java.lang.String osSdkRoot,
SdkManager sdkManager,
ITaskMonitor monitor)
Scan the give SDK to find all the packages already installed at this location. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PARSE_ALL
public static final int PARSE_TOOLS
public static final int PARSE_PLATFORM_TOOLS
public static final int PARSE_DOCS
public static final int PARSE_PLATFORMS
SdkManager.
Parsing the platforms also parses the SDK/system-images folder.
public static final int PARSE_ADDONS
SdkManager.
public static final int PARSE_SAMPLES
public static final int PARSE_SOURCES
public static final int PARSE_EXTRAS
public static final int PARSE_BUILD_TOOLS
| Constructor Detail |
|---|
public LocalSdkParser()
| Method Detail |
|---|
public Package[] getPackages()
parseSdk(java.lang.String, com.android.sdklib.SdkManager, com.android.sdklib.internal.repository.ITaskMonitor).
This returns initially returns null.
Once the parseSdk() method has been called, this returns a possibly empty but non-null array.
public void clearPackages()
getPackages() will return
null till parseSdk(java.lang.String, com.android.sdklib.SdkManager, com.android.sdklib.internal.repository.ITaskMonitor) is called.
@NonNull
public Package[] parseSdk(@NonNull
java.lang.String osSdkRoot,
@NonNull
SdkManager sdkManager,
@NonNull
ITaskMonitor monitor)
getPackages() to retrieve them
at any time later.
Equivalent to calling parseSdk(..., PARSE_ALL, ...);
osSdkRoot - The path to the SDK folder, typically sdkManager.getLocation().sdkManager - An existing SDK manager to list current platforms and addons.monitor - A monitor to track progress. Cannot be null.
getPackages().
@NonNull
public Package[] parseSdk(@NonNull
java.lang.String osSdkRoot,
@NonNull
SdkManager sdkManager,
int parseFilter,
@NonNull
ITaskMonitor monitor)
getPackages() to retrieve them
at any time later.
osSdkRoot - The path to the SDK folder, typically sdkManager.getLocation().sdkManager - An existing SDK manager to list current platforms and addons.parseFilter - Either PARSE_ALL or an ORed combination of the other
PARSE_ constants to indicate what should be parsed.monitor - A monitor to track progress. Cannot be null.
getPackages().
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||