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

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

public final class Category
extends Object
implements 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 PERFORMANCE
          Issues related to performance
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, String name, String explanation, int priority)
          Creates a new top level Category with the given sorting priority.
static Category create(String name, int priority)
          Creates a new top level Category with the given sorting priority.
 String getExplanation()
          Returns an explanation for this category, or null
 String getFullName()
          Returns a full name for this category.
 String getName()
          Returns the name of this category
 Category getParent()
          Returns the parent category, or null if this is a top level category
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

Method Detail

create

public static Category create(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

public static Category create(Category parent,
                              String name,
                              String explanation,
                              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
explanation - an optional explanation 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 String getName()
Returns the name of this category

Returns:
the name of this category

getExplanation

public String getExplanation()
Returns an explanation for this category, or null

Returns:
an explanation for this category, or null

getFullName

public 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

compareTo

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


Copyright © 2008-2012. All Rights Reserved.