com.android.sdklib.repository.local
Class LocalAddonPkgInfo

java.lang.Object
  extended by com.android.sdklib.repository.local.LocalPkgInfo
      extended by com.android.sdklib.repository.local.LocalPlatformPkgInfo
          extended by com.android.sdklib.repository.local.LocalAddonPkgInfo
All Implemented Interfaces:
IDescription, IListDescription, java.lang.Comparable<LocalPkgInfo>

public class LocalAddonPkgInfo
extends LocalPlatformPkgInfo


Nested Class Summary
 
Nested classes/interfaces inherited from class com.android.sdklib.repository.local.LocalPlatformPkgInfo
LocalPlatformPkgInfo.Library
 
Field Summary
 
Fields inherited from class com.android.sdklib.repository.local.LocalPlatformPkgInfo
PROP_VERSION_CODENAME, PROP_VERSION_RELEASE, PROP_VERSION_SDK
 
Constructor Summary
LocalAddonPkgInfo(LocalSdk localSdk, java.io.File localDir, java.util.Properties sourceProps, AndroidVersion version, com.android.repository.Revision revision, IdDisplay vendor, IdDisplay name)
           
 
Method Summary
protected  IAndroidTarget createAndroidTarget()
          Creates the AddOnTarget.
 IPkgDesc getDesc()
          Returns the IPkgDesc describing this package.
 java.lang.String getTargetHash()
          The "path" of an add-on is its Target Hash.
static java.lang.String sanitizeDisplayToNameId(java.lang.String displayName)
          Computes a sanitized name-id based on an addon name-display.
 
Methods inherited from class com.android.sdklib.repository.local.LocalPlatformPkgInfo
getAndroidTarget, isLoaded
 
Methods inherited from class com.android.sdklib.repository.local.LocalPkgInfo
compareTo, delete, equals, getListDescription, getLoadError, getLocalDir, getLocalSdk, getLongDescription, getShortDescription, getSourceProperties, hashCode, hasLoadError, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalAddonPkgInfo

public LocalAddonPkgInfo(@NonNull
                         LocalSdk localSdk,
                         @NonNull
                         java.io.File localDir,
                         @NonNull
                         java.util.Properties sourceProps,
                         @NonNull
                         AndroidVersion version,
                         @NonNull
                         com.android.repository.Revision revision,
                         @NonNull
                         IdDisplay vendor,
                         @NonNull
                         IdDisplay name)
Method Detail

getDesc

@NonNull
public IPkgDesc getDesc()
Description copied from class: LocalPkgInfo
Returns the IPkgDesc describing this package.

Overrides:
getDesc in class LocalPlatformPkgInfo

getTargetHash

@NonNull
public java.lang.String getTargetHash()
The "path" of an add-on is its Target Hash.

Overrides:
getTargetHash in class LocalPlatformPkgInfo

sanitizeDisplayToNameId

public static java.lang.String sanitizeDisplayToNameId(@NonNull
                                                       java.lang.String displayName)
Computes a sanitized name-id based on an addon name-display. This is used to provide compatibility with older add-ons that lacks the new fields.

Parameters:
displayName - A name-display field or a old-style name field.
Returns:
A non-null sanitized name-id that fits in the [a-zA-Z0-9_-]+ pattern.

createAndroidTarget

@Nullable
protected IAndroidTarget createAndroidTarget()
Creates the AddOnTarget. Invoked by LocalPlatformPkgInfo.getAndroidTarget().

Overrides:
createAndroidTarget in class LocalPlatformPkgInfo