Class CategoryDefinition

java.lang.Object
soot.jimple.infoflow.android.data.CategoryDefinition
All Implemented Interfaces:
ISourceSinkCategory

public class CategoryDefinition extends Object implements ISourceSinkCategory
A category definition for a source or sink method
Author:
Steven Arzt
  • Field Details

  • Constructor Details

    • CategoryDefinition

      public CategoryDefinition(String categoryId)
      Creates a new instance of the CategoryDefinition class
      Parameters:
      categoryId - user-defined category ID
    • CategoryDefinition

      public CategoryDefinition(String customCategoryId, String humanReadableNmae)
      Creates a new instance of the CategoryDefinition class
      Parameters:
      customCategoryId - A user-defined category ID
      humanReadableNmae - An optional human-readable name
  • Method Details

    • getCategoryId

      public String getCategoryId()
      Gets the user-defined category id.
      Returns:
      The user-defined category id
    • setCategoryId

      public void setCategoryId(String id)
      Sets the user-defined category id. This is an identifier for the system. To define a human-readable category description, use the setCustomDescription() instead.
      Parameters:
      id - The user-defined category id. Category identifiers must be unique.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getHumanReadableDescription

      public String getHumanReadableDescription()
      Gets the category description as a string. This method either returns a human-readable description for the current system category or the user-defined category if the system-defined category is "NO_CATEGORY", but a user-defined category is available.
      Specified by:
      getHumanReadableDescription in interface ISourceSinkCategory
      Returns:
      The category description as a string
    • getIdOnlyDescription

      public CategoryDefinition getIdOnlyDescription()
      Gets a variant of this description that only contains identifiers. Such a variant is helpful when trying to identify the category in a collection in which not necessary all meta data is available.
      Returns:
      A variant of this category definition that only contains identifiers, but not, e.g., descriptions
    • getID

      public String getID()
      Specified by:
      getID in interface ISourceSinkCategory