com.android.tools.lint.client.api
Class SdkInfo

java.lang.Object
  extended by com.android.tools.lint.client.api.SdkInfo

@Beta
public abstract class SdkInfo
extends java.lang.Object

Information about SDKs

NOTE: This is not a public or final API; if you rely on this be prepared to adjust your code for the next tools release.


Constructor Summary
SdkInfo()
           
 
Method Summary
abstract  java.lang.String getParentViewClass(java.lang.String fqcn)
          Returns the fully qualified name of the parent view, or null if the view is the root android.view.View class.
abstract  java.lang.String getParentViewName(java.lang.String name)
          Returns the class name of the parent view, or null if the view is the root android.view.View class.
 boolean isLayout(java.lang.String tag)
          Returns true if the given widget name is a layout
 boolean isSubViewOf(java.lang.String parentViewFqcn, java.lang.String childViewFqcn)
          Returns true if the given child view is the same class or a sub class of the given parent view class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SdkInfo

public SdkInfo()
Method Detail

isSubViewOf

public boolean isSubViewOf(@NonNull
                           java.lang.String parentViewFqcn,
                           @NonNull
                           java.lang.String childViewFqcn)
Returns true if the given child view is the same class or a sub class of the given parent view class

Parameters:
parentViewFqcn - the fully qualified class name of the parent view
childViewFqcn - the fully qualified class name of the child view
Returns:
true if the child view is a sub view of (or the same class as) the parent view

getParentViewClass

@Nullable
public abstract java.lang.String getParentViewClass(@NonNull
                                                             java.lang.String fqcn)
Returns the fully qualified name of the parent view, or null if the view is the root android.view.View class.

Parameters:
fqcn - the fully qualified class name of the view
Returns:
the fully qualified class name of the parent view, or null

getParentViewName

@Nullable
public abstract java.lang.String getParentViewName(@NonNull
                                                            java.lang.String name)
Returns the class name of the parent view, or null if the view is the root android.view.View class. This is the same as the getParentViewClass(String) but without the package.

Parameters:
name - the view class name to look up the parent for (not including package)
Returns:
the view name of the parent

isLayout

public boolean isLayout(@NonNull
                        java.lang.String tag)
Returns true if the given widget name is a layout

Parameters:
tag - the XML tag for the view
Returns:
true if the given tag corresponds to a layout