java.lang.Object
org.aspectj.org.eclipse.jdt.core.compiler.CategorizedProblem
org.aspectj.org.eclipse.jdt.internal.compiler.problem.DefaultProblem
All Implemented Interfaces:
IProblem
Direct Known Subclasses:
AptProblem

public class DefaultProblem extends CategorizedProblem
  • Field Details

    • column

      public int column
    • severity

      public int severity
    • EMPTY_VALUES

      public static final Object[] EMPTY_VALUES
  • Constructor Details

    • DefaultProblem

      public DefaultProblem(char[] originatingFileName, String message, int id, String[] stringArguments, int severity, int startPosition, int endPosition, int line, int column)
  • Method Details

    • reportError

      public void reportError()
    • errorReportSource

      public String errorReportSource(char[] unitSource)
    • getArguments

      public String[] getArguments()
      Description copied from interface: IProblem
      Answer back the original arguments recorded into the problem.
      Returns:
      the original arguments recorded into the problem
    • getCategoryID

      public int getCategoryID()
      Description copied from class: CategorizedProblem
      Returns an integer identifying the category of this problem. Categories, like problem IDs are defined in the context of some marker type. Custom implementations of CategorizedProblem may choose arbitrary values for problem/category IDs, as long as they are associated with a different marker type. Standard Java problem markers (i.e. marker type is "org.eclipse.jdt.core.problem") carry an attribute "categoryId" persisting the originating problem category ID as defined by this method).
      Specified by:
      getCategoryID in class CategorizedProblem
      Returns:
      id - an integer identifying the category of this problem
      See Also:
      CategorizedProblem.getCategoryID()
    • getID

      public int getID()
      Answer the type of problem.
      Returns:
      int
      See Also:
      IProblem.getID()
    • getInternalCategoryMessage

      public String getInternalCategoryMessage()
      Answers a readable name for the category which this problem belongs to, or null if none could be found. FOR TESTING PURPOSE
      Returns:
      java.lang.String
    • getMarkerType

      public String getMarkerType()
      Returns the marker type associated to this problem.
      Specified by:
      getMarkerType in class CategorizedProblem
      Returns:
      the type of the marker which would be associated to the problem
      See Also:
      CategorizedProblem.getMarkerType()
    • getMessage

      public String getMessage()
      Description copied from interface: IProblem
      Answer a localized, human-readable message string which describes the problem.
      Returns:
      a localized, human-readable message string which describes the problem
    • getOriginatingFileName

      public char[] getOriginatingFileName()
      Description copied from interface: IProblem
      Answer the file name in which the problem was found.
      Returns:
      the file name in which the problem was found
    • getSourceEnd

      public int getSourceEnd()
      Description copied from interface: IProblem
      Answer the end position of the problem (inclusive), or -1 if unknown.
      Returns:
      the end position of the problem (inclusive), or -1 if unknown
    • getSourceColumnNumber

      public int getSourceColumnNumber()
      Answer the line number in source where the problem begins.
      Returns:
      int
    • getSourceLineNumber

      public int getSourceLineNumber()
      Description copied from interface: IProblem
      Answer the line number in source where the problem begins.
      Returns:
      the line number in source where the problem begins
    • getSourceStart

      public int getSourceStart()
      Description copied from interface: IProblem
      Answer the start position of the problem (inclusive), or -1 if unknown.
      Returns:
      the start position of the problem (inclusive), or -1 if unknown
    • isError

      public boolean isError()
      Description copied from interface: IProblem
      Returns whether the severity of this problem is 'Error'.
      Returns:
      true if the severity of this problem is 'Error', false otherwise
    • isWarning

      public boolean isWarning()
      Description copied from interface: IProblem
      Returns whether the severity of this problem is 'Warning'.
      Returns:
      true if the severity of this problem is 'Warning', false otherwise
    • isInfo

      public boolean isInfo()
      Description copied from class: CategorizedProblem
      Returns whether the severity of this problem is 'Info'.

      Note: This implementation always returns false, subclasses can override.

      Specified by:
      isInfo in interface IProblem
      Overrides:
      isInfo in class CategorizedProblem
      Returns:
      true if the severity of this problem is 'Info', false otherwise
    • setOriginatingFileName

      public void setOriginatingFileName(char[] fileName)
    • setSourceEnd

      public void setSourceEnd(int sourceEnd)
      Description copied from interface: IProblem
      Set the end position of the problem (inclusive), or -1 if unknown. Used for shifting problem positions.
      Parameters:
      sourceEnd - the given end position
    • setSourceLineNumber

      public void setSourceLineNumber(int lineNumber)
      Description copied from interface: IProblem
      Set the line number in source where the problem begins.
      Parameters:
      lineNumber - the given line number
    • setSourceStart

      public void setSourceStart(int sourceStart)
      Description copied from interface: IProblem
      Set the start position of the problem (inclusive), or -1 if unknown. Used for shifting problem positions.
      Parameters:
      sourceStart - the given start position
    • toString

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

      public void setSeeAlsoProblems(IProblem[] problems)
    • seeAlso

      public IProblem[] seeAlso()
    • getSupplementaryMessageInfo

      public String getSupplementaryMessageInfo()
    • setSupplementaryMessageInfo

      public void setSupplementaryMessageInfo(String msg)