Package org.jboss.forge.roaster
Class Problem
- java.lang.Object
-
- org.jboss.forge.roaster.Problem
-
public class Problem extends Object
During the parsing of code, problems can occur which can be wrapped inside a object with this class.- Author:
- George Gastaldi
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetMessage()Returns the message of this problem.intgetSourceEnd()Returns the end position of this problem or -1 if unknown.intgetSourceLineNumber()Returns the source line number of the start of the problem.intgetSourceStart()Returns the start position of this problem or -1 if unknown.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
Problem
public Problem(String message, int sourceStart, int sourceEnd, int sourceLineNumber)
Constructs a newProblemwith the given attributes.- Parameters:
message- the message of this problem in a human readable formsourceStart- the start position of the problemsourceEnd- the end position of the problemsourceLineNumber- the source line number of the start of the problem
-
-
Method Detail
-
getMessage
public String getMessage()
Returns the message of this problem.- Returns:
- the message
-
getSourceStart
public int getSourceStart()
Returns the start position of this problem or -1 if unknown.- Returns:
- the start position
-
getSourceEnd
public int getSourceEnd()
Returns the end position of this problem or -1 if unknown.- Returns:
- the end position
-
getSourceLineNumber
public int getSourceLineNumber()
Returns the source line number of the start of the problem.- Returns:
- the source line number
-
-