public class Report
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Report.ReportBuilder
Must be constructed through the factory method in Report.
|
Modifier | Constructor and Description |
---|---|
protected |
Report(ReportType type,
java.lang.Throwable exception,
java.lang.Object[] messageParameters,
java.lang.Object[] callerParameters)
Construct a new report with the given type and parameters.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object[] |
getCallerParameters()
Retrieve the parameters of the caller method.
|
java.lang.Throwable |
getException()
Retrieve the associated exception, or NULL if not found.
|
java.lang.Object[] |
getMessageParameters()
Retrieve the message parameters that will be used to construc the report message.
|
java.lang.String |
getReportMessage()
Format the current report type with the provided message parameters.
|
ReportType |
getType()
Retrieve the report type.
|
boolean |
hasCallerParameters()
Determine if we have any caller parameters.
|
boolean |
hasMessageParameters()
Determine if we have any message parameters.
|
static Report.ReportBuilder |
newBuilder(ReportType type)
Construct a new report builder.
|
protected Report(ReportType type, @Nullable java.lang.Throwable exception, @Nullable java.lang.Object[] messageParameters, @Nullable java.lang.Object[] callerParameters)
exception
- - exception that occured in the caller method.type
- - the report type that will be used to construct the message.messageParameters
- - parameters used to construct the report message.callerParameters
- - parameters from the caller method.public static Report.ReportBuilder newBuilder(ReportType type)
type
- - the initial report type.public java.lang.String getReportMessage()
public java.lang.Object[] getMessageParameters()
public java.lang.Object[] getCallerParameters()
public ReportType getType()
public java.lang.Throwable getException()
public boolean hasMessageParameters()
public boolean hasCallerParameters()