Class MessageBuilder
java.lang.Object
io.github.chrimle.exceptionfactory.MessageBuilder
Builder of message strings.
- Since:
- 0.4.0
-
Method Summary
Modifier and TypeMethodDescriptionAdds a string representation of theobject, viaObject.toString(), to this builder.addCodeQuote(Object object) Adds a code quoted string representation of theobject, within``-quotes, to this builder.addFormatSpecifier(Class<?> formatClass) Adds a format specifier, based on theformatClass, to this builder.static @NotNull MessageBuilderFactory method for instantiatingMessageBuilder.toString()
-
Method Details
-
newMessageBuilder
Factory method for instantiatingMessageBuilder.- Returns:
- a new instance.
- Since:
- 0.4.0
-
addFormatSpecifier
Adds a format specifier, based on theformatClass, to this builder.- Parameters:
formatClass- to format.- Returns:
- this builder.
- Throws:
IllegalArgumentException- ifformatClassisnull.- Since:
- 0.4.0
-
addCodeQuote
Adds a code quoted string representation of theobject, within``-quotes, to this builder.- Parameters:
object- to quote and add.- Returns:
- this builder.
- Throws:
IllegalArgumentException- ifobjectisnull.- Since:
- 0.4.0
-
add
Adds a string representation of theobject, viaObject.toString(), to this builder.- Parameters:
object- to add.- Returns:
- this builder.
- Throws:
IllegalArgumentException- ifobjectisnull.- Since:
- 0.4.0
-
toString
-