Class Issue<T>

  • Type Parameters:
    T - The issue type.

    public class Issue<T>
    extends Object
    Base class used to describe 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
    • Constructor Detail

      • Issue

        public Issue​(IssueId<T> id,
                     IssueLevel level,
                     String description,
                     Throwable cause)
        Creates an Issue.
        Parameters:
        id - The issue id.
        level - The issue level.
        description - The issue description.
        cause - The optional cause.
      • Issue

        public Issue​(IssueId<T> id,
                     IssueLevel level,
                     String description)
        Creates an Issue.
        Parameters:
        id - The issue id.
        level - The issue level.
        description - The issue description.
      • Issue

        public Issue​(T type,
                     List<? extends IssueLocation> locations,
                     IssueLevel level,
                     String description,
                     Throwable cause)
        Creates an Issue.
        Parameters:
        type - The issue type.
        locations - The target locations.
        level - The issue level.
        description - The issue description.
        cause - The optional cause.
      • Issue

        public Issue​(T type,
                     List<? extends IssueLocation> locations,
                     IssueLevel level,
                     String description)
        Creates an Issue.
        Parameters:
        type - The issue type.
        locations - The target locations.
        level - The issue level.
        description - The issue description.
    • Method Detail

      • getTimestamp

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

        public IssueId<T> getId()
        Returns:
        The id of this issue.
      • getIssueType

        public T getIssueType()
        Returns:
        The type of this issue.
      • getIssueLevel

        public final IssueLevel getIssueLevel()
        Returns:
        The level of this issue.
      • getDescription

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

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

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

        public IssueLocation getLocationAt​(int index)
      • getLocationAt

        public <L extends IssueLocation> L getLocationAt​(int index,
                                                         Class<L> cls)
      • getCause

        public Throwable getCause()
        Returns:
        The cause of this issue, or null.