public class ExceptionKey extends Object
The ExceptionKey class implements custom equals and hashCode
methods ensuring that two keys are equal if and only if all their fields are equal.
| Modifier and Type | Field and Description |
|---|---|
Class<?> |
clazz
The class where the exception occurred
|
LogLevel |
level
The log level associated with the exception
|
String |
message
A message associated with the exception
|
Throwable |
throwable
The Throwable instance representing the exception
|
| Constructor and Description |
|---|
ExceptionKey(LogLevel level,
Class<?> clazz,
String message,
Throwable throwable)
Constructs an
ExceptionKey with the specified log level, class,
message, and Throwable instance. |
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
clazz()
Returns the class where the exception occurred.
|
boolean |
equals(Object o)
Determines whether this exception key is equal to another object.
|
int |
hashCode()
Computes the hash code for this exception key based on its fields.
|
LogLevel |
level()
Returns the log level associated with the exception.
|
String |
message()
Returns the message associated with the exception.
|
Throwable |
throwable()
Returns the Throwable instance representing the exception.
|
@NotNull String |
toString()
Returns a string representation of the exception key, including the
log level, class, message, and the stack trace of the Throwable instance.
|
public final LogLevel level
public final Class<?> clazz
public final String message
public final Throwable throwable
public ExceptionKey(LogLevel level, Class<?> clazz, String message, Throwable throwable)
ExceptionKey with the specified log level, class,
message, and Throwable instance.level - The log level associated with the exception.clazz - The class where the exception occurred.message - A message associated with the exception.throwable - The Throwable instance representing the exception.public LogLevel level()
public Class<?> clazz()
public String message()
public Throwable throwable()
public int hashCode()
public boolean equals(Object o)
Copyright © 2024. All rights reserved.