Package com.github.javaparser
Class Problem
- java.lang.Object
-
- com.github.javaparser.Problem
-
public class Problem extends java.lang.Object
A problem that was encountered during parsing.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Throwable
cause
private TokenRange
location
private java.lang.String
message
static java.util.Comparator<Problem>
PROBLEM_BY_BEGIN_POSITION
Sorts problems on position.
-
Constructor Summary
Constructors Constructor Description Problem(java.lang.String message, TokenRange location, java.lang.Throwable cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.lang.Throwable>
getCause()
java.util.Optional<TokenRange>
getLocation()
java.lang.String
getMessage()
java.lang.String
getVerboseMessage()
java.lang.String
toString()
-
-
-
Field Detail
-
message
private final java.lang.String message
-
location
private final TokenRange location
-
cause
private final java.lang.Throwable cause
-
PROBLEM_BY_BEGIN_POSITION
public static java.util.Comparator<Problem> PROBLEM_BY_BEGIN_POSITION
Sorts problems on position.
-
-
Constructor Detail
-
Problem
public Problem(java.lang.String message, TokenRange location, java.lang.Throwable cause)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getMessage
public java.lang.String getMessage()
- Returns:
- the message that was passed into the constructor.
-
getVerboseMessage
public java.lang.String getVerboseMessage()
- Returns:
- the message plus location information.
-
getLocation
public java.util.Optional<TokenRange> getLocation()
- Returns:
- the location that was passed into the constructor.
-
getCause
public java.util.Optional<java.lang.Throwable> getCause()
- Returns:
- the cause that was passed into the constructor.
-
-