Package cdc.issues

Class Issue


  • public class Issue
    extends Object
    Base class used to describe an Issue (more exactly an occurrence of detection of an issue).

    Node: This class can be specialized if necessary.

    An issue may have several targets.
    For example, when there is a compliance issue between several things, one can not tell which one is at fault.

    Author:
    Damien Carbonne
    • Field Detail

      • TIMESTAMP_COMPARATOR

        public static final Comparator<Issue> TIMESTAMP_COMPARATOR
        Comparator of Issues sing timestamp.
    • Method Detail

      • getTimestamp

        public final Instant getTimestamp()
        Returns:
        The Instant at which this issue was created.
      • getId

        public IssueId getId()
        Returns:
        The id of this issue.
      • getRuleId

        public RuleId getRuleId()
        Returns:
        The RuleId of this issue.
      • getDomain

        public String getDomain()
        Returns:
        The domain of the rule of this issue.
      • getName

        public String getName()
        Returns:
        The name of the rule of this rule.
      • getName

        public <T extends Enum<T>> T getName​(Class<T> typeClass)
      • getParams

        public Params getParams()
        Returns:
        The rule parameters of this issue.
      • getProject

        public String getProject()
        Returns:
        The project of this issue. May be null.
      • getSnapshot

        public String getSnapshot()
        Returns:
        The snapshot of this issue. May be null.
      • getSeverity

        public final IssueSeverity getSeverity()
        Returns:
        The severity of this issue.
      • getDescription

        public final String getDescription()
        Returns:
        The description of this issue.
      • getMetas

        public Params getMetas()
        Returns:
        The meta data associated to this issue.
      • getLocations

        public Location[] getLocations()
        Returns:
        The target locations of this issue.
      • getNumberOfLocations

        public final int getNumberOfLocations()
        Returns:
        The number of target locations of this issue.
      • getLocationAt

        public Location getLocationAt​(int index)
      • getLocationAt

        public <L extends Location> L getLocationAt​(int index,
                                                    Class<L> cls)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object