Package com.comphenix.protocol.error
Class Report.ReportBuilder
java.lang.Object
com.comphenix.protocol.error.Report.ReportBuilder
- Enclosing class:
Report
Must be constructed through the factory method in Report.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Construct a new report with the provided input.callerParam(Object... callerParameters) Set the parameters in the caller method.Set the current exception that occurred.messageParam(Object... messageParameters) Set the message parameters that are used to construct a message text.rateLimit(long rateLimit) Set the minimum number of nanoseconds to wait until a report of equal type and parameters is allowed to be printed again.Set the minimum time to wait until a report of equal type and parameters is allowed to be printed again.type(ReportType type) Set the current report type.
-
Method Details
-
type
Set the current report type. Cannot be NULL.- Parameters:
type- - report type.- Returns:
- This builder, for chaining.
-
error
Set the current exception that occurred.- Parameters:
exception- - exception that occurred.- Returns:
- This builder, for chaining.
-
messageParam
Set the message parameters that are used to construct a message text.- Parameters:
messageParameters- - parameters for the report type.- Returns:
- This builder, for chaining.
-
callerParam
Set the parameters in the caller method. This is optional.- Parameters:
callerParameters- - parameters of the caller method.- Returns:
- This builder, for chaining.
-
rateLimit
Set the minimum number of nanoseconds to wait until a report of equal type and parameters is allowed to be printed again.- Parameters:
rateLimit- - number of nanoseconds, or 0 to disable. Cannot be negative.- Returns:
- This builder, for chaining.
-
rateLimit
Set the minimum time to wait until a report of equal type and parameters is allowed to be printed again.- Parameters:
rateLimit- - the time, or 0 to disable. Cannot be negative.rateUnit- - the unit of the rate limit.- Returns:
- This builder, for chaining.
-
build
Construct a new report with the provided input.- Returns:
- A new report.
-