com.android.sdklib.repository.descriptors
Class PkgDesc.Builder

java.lang.Object
  extended by com.android.sdklib.repository.descriptors.PkgDesc.Builder
Enclosing class:
PkgDesc

public static class PkgDesc.Builder
extends java.lang.Object


Method Summary
 IPkgDesc create()
           
static PkgDesc.Builder newAddon(AndroidVersion version, MajorRevision revision, IdDisplay addonVendor, IdDisplay addonName)
          Create a new add-on package descriptor.
static PkgDesc.Builder newAddonSysImg(AndroidVersion version, IdDisplay addonVendor, IdDisplay addonName, java.lang.String abi, MajorRevision revision)
          Create a new add-on system-image package descriptor.
static PkgDesc.Builder newBuildTool(FullRevision revision)
          Creates a new build-tool package descriptor.
static PkgDesc.Builder newDoc(AndroidVersion version, MajorRevision revision)
          Creates a new doc package descriptor.
static PkgDesc.Builder newExtra(IdDisplay vendor, java.lang.String path, java.lang.String displayName, java.lang.String[] oldPaths, NoPreviewRevision revision)
          Creates a new extra package descriptor.
static PkgDesc.Builder newLLDB(FullRevision revision)
          Creates a new LLDB package descriptor.
static PkgDesc.Builder newNdk(FullRevision revision)
          Creates a new NDK package descriptor.
static PkgDesc.Builder newPlatform(AndroidVersion version, MajorRevision revision, FullRevision minToolsRev)
          Creates a new platform package descriptor.
static PkgDesc.Builder newPlatformTool(FullRevision revision)
          Creates a new platform-tool package descriptor.
static PkgDesc.Builder newSample(AndroidVersion version, MajorRevision revision, FullRevision minToolsRev)
          Create a new sample package descriptor.
static PkgDesc.Builder newSource(AndroidVersion version, MajorRevision revision)
          Create a new source package descriptor.
static PkgDesc.Builder newSysImg(AndroidVersion version, IdDisplay tag, java.lang.String abi, MajorRevision revision)
          Create a new platform system-image package descriptor.
static PkgDesc.Builder newTool(FullRevision revision, FullRevision minPlatformToolsRev)
          Creates a new tool package descriptor.
 PkgDesc.Builder setDescriptionShort(java.lang.String text)
           
 PkgDesc.Builder setDescriptionUrl(java.lang.String text)
           
 PkgDesc.Builder setIsObsolete(boolean isObsolete)
           
 PkgDesc.Builder setLicense(License license)
           
 PkgDesc.Builder setListDisplay(java.lang.String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newTool

@NonNull
public static PkgDesc.Builder newTool(@NonNull
                                              FullRevision revision,
                                              @NonNull
                                              FullRevision minPlatformToolsRev)
Creates a new tool package descriptor.

Parameters:
revision - The revision of the tool package.
minPlatformToolsRev - The min-platform-tools-rev. Use FullRevision.NOT_SPECIFIED to indicate there is no requirement.
Returns:
A PkgDesc describing this tool package.

newPlatformTool

@NonNull
public static PkgDesc.Builder newPlatformTool(@NonNull
                                                      FullRevision revision)
Creates a new platform-tool package descriptor.

Parameters:
revision - The revision of the platform-tool package.
Returns:
A PkgDesc describing this platform-tool package.

newBuildTool

@NonNull
public static PkgDesc.Builder newBuildTool(@NonNull
                                                   FullRevision revision)
Creates a new build-tool package descriptor.

Parameters:
revision - The revision of the build-tool package.
Returns:
A PkgDesc describing this build-tool package.

newDoc

@NonNull
public static PkgDesc.Builder newDoc(@NonNull
                                             AndroidVersion version,
                                             @NonNull
                                             MajorRevision revision)
Creates a new doc package descriptor.

Parameters:
revision - The revision of the doc package.
Returns:
A PkgDesc describing this doc package.

newExtra

@NonNull
public static PkgDesc.Builder newExtra(@NonNull
                                               IdDisplay vendor,
                                               @NonNull
                                               java.lang.String path,
                                               @Nullable
                                               java.lang.String displayName,
                                               @Nullable
                                               java.lang.String[] oldPaths,
                                               @NonNull
                                               NoPreviewRevision revision)
Creates a new extra package descriptor.

Parameters:
vendor - The vendor id string of the extra package.
path - The path id string of the extra package.
displayName - The display name. If missing, caller should build one using the path.
oldPaths - An optional list of older paths for this extra package.
revision - The revision of the extra package.
Returns:
A PkgDesc describing this extra package.

newPlatform

@NonNull
public static PkgDesc.Builder newPlatform(@NonNull
                                                  AndroidVersion version,
                                                  @NonNull
                                                  MajorRevision revision,
                                                  @NonNull
                                                  FullRevision minToolsRev)
Creates a new platform package descriptor.

Parameters:
version - The android version of the platform package.
revision - The revision of the extra package.
minToolsRev - An optional min-tools-rev. Use FullRevision.NOT_SPECIFIED to indicate there is no requirement.
Returns:
A PkgDesc describing this platform package.

newAddon

@NonNull
public static PkgDesc.Builder newAddon(@NonNull
                                               AndroidVersion version,
                                               @NonNull
                                               MajorRevision revision,
                                               @NonNull
                                               IdDisplay addonVendor,
                                               @NonNull
                                               IdDisplay addonName)
Create a new add-on package descriptor.

The vendor id and the name id provided are used to compute the add-on's target hash.

Parameters:
version - The android version of the add-on package.
revision - The revision of the add-on package.
addonVendor - The vendor id/display of the add-on package.
addonName - The name id/display of the add-on package.
Returns:
A PkgDesc describing this add-on package.

newSysImg

@NonNull
public static PkgDesc.Builder newSysImg(@NonNull
                                                AndroidVersion version,
                                                @NonNull
                                                IdDisplay tag,
                                                @NonNull
                                                java.lang.String abi,
                                                @NonNull
                                                MajorRevision revision)
Create a new platform system-image package descriptor.

For system-images, PkgDesc.getPath() returns the ABI.

Parameters:
version - The android version of the system-image package.
tag - The tag of the system-image package.
abi - The ABI of the system-image package.
revision - The revision of the system-image package.
Returns:
A PkgDesc describing this system-image package.

newAddonSysImg

@NonNull
public static PkgDesc.Builder newAddonSysImg(@NonNull
                                                     AndroidVersion version,
                                                     @NonNull
                                                     IdDisplay addonVendor,
                                                     @NonNull
                                                     IdDisplay addonName,
                                                     @NonNull
                                                     java.lang.String abi,
                                                     @NonNull
                                                     MajorRevision revision)
Create a new add-on system-image package descriptor.

For system-images, PkgDesc.getPath() returns the ABI.

Parameters:
version - The android version of the system-image package.
addonVendor - The vendor id/display of an associated add-on.
addonName - The tag of the system-image package is the add-on name.
abi - The ABI of the system-image package.
revision - The revision of the system-image package.
Returns:
A PkgDesc describing this system-image package.

newSource

@NonNull
public static PkgDesc.Builder newSource(@NonNull
                                                AndroidVersion version,
                                                @NonNull
                                                MajorRevision revision)
Create a new source package descriptor.

Parameters:
version - The android version of the source package.
revision - The revision of the source package.
Returns:
A PkgDesc describing this source package.

newSample

@NonNull
public static PkgDesc.Builder newSample(@NonNull
                                                AndroidVersion version,
                                                @NonNull
                                                MajorRevision revision,
                                                @NonNull
                                                FullRevision minToolsRev)
Create a new sample package descriptor.

Parameters:
version - The android version of the sample package.
revision - The revision of the sample package.
minToolsRev - An optional min-tools-rev. Use FullRevision.NOT_SPECIFIED to indicate there is no requirement.
Returns:
A PkgDesc describing this sample package.

newNdk

@NonNull
public static PkgDesc.Builder newNdk(@NonNull
                                             FullRevision revision)
Creates a new NDK package descriptor.

Parameters:
revision - The revision of the NDK package.
Returns:
A PkgDesc describing this NDK package.

newLLDB

@NonNull
public static PkgDesc.Builder newLLDB(@NonNull
                                              FullRevision revision)
Creates a new LLDB package descriptor.

Parameters:
revision - The revision of the LLDB package.
Returns:
A PkgDesc describing this LLDB package.

setLicense

public PkgDesc.Builder setLicense(@Nullable
                                  License license)

setListDisplay

public PkgDesc.Builder setListDisplay(@Nullable
                                      java.lang.String text)

setDescriptionShort

public PkgDesc.Builder setDescriptionShort(@Nullable
                                           java.lang.String text)

setDescriptionUrl

public PkgDesc.Builder setDescriptionUrl(@Nullable
                                         java.lang.String text)

setIsObsolete

public PkgDesc.Builder setIsObsolete(boolean isObsolete)

create

public IPkgDesc create()