Package org.jboss.forge.roaster
Class Problem
- java.lang.Object
-
- org.jboss.forge.roaster.Problem
-
public class Problem extends java.lang.ObjectDuring the parsing of code, problems can occur which can be wrapped inside a object with this class.- Author:
- George Gastaldi
-
-
Constructor Summary
Constructors Constructor Description Problem(java.lang.String message, int sourceStart, int sourceEnd, int sourceLineNumber)Constructs a newProblemwith the given attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.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()java.lang.StringtoString()
-
-
-
Constructor Detail
-
Problem
public Problem(java.lang.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 java.lang.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
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-