public class Marker extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Marker.MarkerLevel
An enumeration that represents possible marker levels.
|
Modifier and Type | Field and Description |
---|---|
static int |
NO_LINE_NUMBER
A constant to indicate there is no line number information in a marker.
|
Constructor and Description |
---|
Marker(String message,
File file,
int line,
Marker.MarkerLevel level)
Instantiates a new marker with given message and level.
|
Marker(String message,
File file,
int line,
Throwable cause,
Marker.MarkerLevel level)
Instantiates a new marker with given message, cause and level.
|
Marker(String message,
Marker.MarkerLevel level)
Instantiates a new marker with given message and level.
|
Marker(String message,
Throwable cause,
Marker.MarkerLevel level)
Instantiates a new marker with given message, cause and level.
|
Marker(Throwable cause,
Marker.MarkerLevel level)
Instantiates a new marker with given cause and level.
|
Modifier and Type | Method and Description |
---|---|
Throwable |
getCause()
Gets the cause carried by this marker.
|
File |
getFile()
Gets the file pointed by this marker.
|
Marker.MarkerLevel |
getLevel()
Gets the level of this marker.
|
int |
getLine()
Gets the line number in the file pointed by this marker.
|
String |
getMessage()
Gets the message carried by this marker.
|
public static final int NO_LINE_NUMBER
public Marker(String message, File file, int line, Marker.MarkerLevel level)
message
- the message carried by the marker to create.file
- the file pointed by the marker to create.line
- the line number of the file pointed the marker to create.level
- the level of the marker to create.public Marker(String message, File file, int line, Throwable cause, Marker.MarkerLevel level)
message
- the message carried by the marker to create.file
- the file pointed by the marker to create.line
- the line number of the file pointed the marker to create.cause
- the cause of this marker.level
- the level of the marker to create.public Marker(String message, Marker.MarkerLevel level)
message
- the message carried by the marker to create.level
- the level of the marker to create.public Marker(String message, Throwable cause, Marker.MarkerLevel level)
message
- the message carried by the marker to create.cause
- the cause of this marker.level
- the level of the marker to create.public Marker(Throwable cause, Marker.MarkerLevel level)
cause
- the cause of this marker.level
- the level of the marker to create.public Throwable getCause()
null
if there is no cause to this marker.public File getFile()
null
if no file is attached to this marker.public Marker.MarkerLevel getLevel()
public int getLine()
NO_LINE_NUMBER
if there is no line number
information.public String getMessage()
null
if this marker has no message.