com.android.sdklib
Class BuildToolInfo

java.lang.Object
  extended by com.android.sdklib.BuildToolInfo

public class BuildToolInfo
extends java.lang.Object

Information on a specific build-tool folder.


Nested Class Summary
static class BuildToolInfo.PathId
           
 
Constructor Summary
BuildToolInfo(FullRevision revision, java.io.File path)
           
BuildToolInfo(FullRevision revision, java.io.File mainPath, java.io.File aapt, java.io.File aidl, java.io.File dx, java.io.File dxJar, java.io.File llmvRsCc, java.io.File androidRs, java.io.File androidRsClang, java.io.File bccCompat, java.io.File ldArm, java.io.File ldX86, java.io.File ldMips)
           
 
Method Summary
 java.io.File getLocation()
          Returns the build-tool revision-specific folder.
 java.lang.String getPath(BuildToolInfo.PathId pathId)
          Returns the path of a build-tool component.
 FullRevision getRevision()
          Returns the revision.
 boolean isValid(com.android.utils.ILogger log)
          Checks whether the build-tool is valid by verifying that the expected binaries are actually present.
 java.lang.String toString()
          Returns a debug representation suitable for unit-tests.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BuildToolInfo

public BuildToolInfo(@NonNull
                     FullRevision revision,
                     @NonNull
                     java.io.File path)

BuildToolInfo

public BuildToolInfo(@NonNull
                     FullRevision revision,
                     @NonNull
                     java.io.File mainPath,
                     @NonNull
                     java.io.File aapt,
                     @NonNull
                     java.io.File aidl,
                     @NonNull
                     java.io.File dx,
                     @NonNull
                     java.io.File dxJar,
                     @NonNull
                     java.io.File llmvRsCc,
                     @NonNull
                     java.io.File androidRs,
                     @NonNull
                     java.io.File androidRsClang,
                     @Nullable
                     java.io.File bccCompat,
                     @Nullable
                     java.io.File ldArm,
                     @Nullable
                     java.io.File ldX86,
                     @Nullable
                     java.io.File ldMips)
Method Detail

getRevision

@NonNull
public FullRevision getRevision()
Returns the revision.


getLocation

@NonNull
public java.io.File getLocation()
Returns the build-tool revision-specific folder.

For compatibility reasons, use getPath(PathId) if you need the path to a specific tool.


getPath

public java.lang.String getPath(BuildToolInfo.PathId pathId)
Returns the path of a build-tool component.

Parameters:
pathId - the id representing the path to return.
Returns:
The absolute path for that tool, with a / separator if it's a folder. Null if the path-id is unknown.

isValid

public boolean isValid(@Nullable
                       com.android.utils.ILogger log)
Checks whether the build-tool is valid by verifying that the expected binaries are actually present. This checks that all known paths point to a valid file or directory.

Parameters:
log - An optional logger. If non-null, errors will be printed there.
Returns:
True if the build-tool folder contains all the expected tools.

toString

public java.lang.String toString()
Returns a debug representation suitable for unit-tests. Note that unit-tests need to clean up the paths to avoid inconsistent results.

Overrides:
toString in class java.lang.Object