com.android.tools.lint.detector.api
Class Category

java.lang.Object
  extended by com.android.tools.lint.detector.api.Category
All Implemented Interfaces:
java.lang.Comparable<Category>

@Beta
public final class Category
extends java.lang.Object
implements java.lang.Comparable<Category>

A category is a container for related issues.

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.


Field Summary
static Category A11Y
          Issues related to accessibility
static Category CORRECTNESS
          Issues related to correctness
static Category I18N
          Issues related to internationalization
static Category ICONS
          Issues related to icons
static Category LINT
          Issues related to running lint itself
static Category MESSAGES
          Issues related to messages/strings
static Category PERFORMANCE
          Issues related to performance
static Category RTL
          Issues related to right to left and bidirectional text support
static Category SECURITY
          Issues related to security
static Category TYPOGRAPHY
          Issues related to typography
static Category USABILITY
          Issues related to usability
 
Method Summary
 int compareTo(Category other)
           
static Category create(Category parent, java.lang.String name, int priority)
          Creates a new top level Category with the given sorting priority.
static Category create(java.lang.String name, int priority)
          Creates a new top level Category with the given sorting priority.
 boolean equals(java.lang.Object o)
           
 java.lang.String getFullName()
          Returns a full name for this category.
 java.lang.String getName()
          Returns the name of this category
 Category getParent()
          Returns the parent category, or null if this is a top level category
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LINT

public static final Category LINT
Issues related to running lint itself


CORRECTNESS

public static final Category CORRECTNESS
Issues related to correctness


SECURITY

public static final Category SECURITY
Issues related to security


PERFORMANCE

public static final Category PERFORMANCE
Issues related to performance


USABILITY

public static final Category USABILITY
Issues related to usability


A11Y

public static final Category A11Y
Issues related to accessibility


I18N

public static final Category I18N
Issues related to internationalization


ICONS

public static final Category ICONS
Issues related to icons


TYPOGRAPHY

public static final Category TYPOGRAPHY
Issues related to typography


MESSAGES

public static final Category MESSAGES
Issues related to messages/strings


RTL

public static final Category RTL
Issues related to right to left and bidirectional text support

Method Detail

create

@NonNull
public static Category create(@NonNull
                                      java.lang.String name,
                                      int priority)
Creates a new top level Category with the given sorting priority.

Parameters:
name - the name of the category
priority - a sorting priority, with higher being more important
Returns:
a new category

create

@NonNull
public static Category create(@Nullable
                                      Category parent,
                                      @NonNull
                                      java.lang.String name,
                                      int priority)
Creates a new top level Category with the given sorting priority.

Parameters:
parent - the name of a parent category, or null
name - the name of the category
priority - a sorting priority, with higher being more important
Returns:
a new category

getParent

public Category getParent()
Returns the parent category, or null if this is a top level category

Returns:
the parent category, or null if this is a top level category

getName

public java.lang.String getName()
Returns the name of this category

Returns:
the name of this category

getFullName

public java.lang.String getFullName()
Returns a full name for this category. For a top level category, this is just the getName() value, but for nested categories it will include the parent names as well.

Returns:
a full name for this category

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(Category other)
Specified by:
compareTo in interface java.lang.Comparable<Category>