Package net.minecraftforge.common.util
Record Class LogMessageAdapter
java.lang.Object
java.lang.Record
net.minecraftforge.common.util.LogMessageAdapter
- All Implemented Interfaces:
Serializable,org.apache.logging.log4j.message.Message,org.apache.logging.log4j.util.StringBuilderFormattable
public record LogMessageAdapter(Consumer<StringBuilder> builder)
extends Record
implements org.apache.logging.log4j.message.Message, org.apache.logging.log4j.util.StringBuilderFormattable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Consumer<StringBuilder> The field for thebuilderrecord component.private static final Object[] -
Constructor Summary
ConstructorsConstructorDescriptionLogMessageAdapter(Consumer<StringBuilder> builder) Creates an instance of aLogMessageAdapterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.logging.log4j.message.Messageadapt(Consumer<StringBuilder> toConsume) builder()Returns the value of thebuilderrecord component.final booleanIndicates whether some other object is "equal to" this one.voidformatTo(StringBuilder buffer) Object[]final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
builder
The field for thebuilderrecord component. -
EMPTY
-
-
Constructor Details
-
LogMessageAdapter
Creates an instance of aLogMessageAdapterrecord class.- Parameters:
builder- the value for thebuilderrecord component
-
-
Method Details
-
getFormattedMessage
- Specified by:
getFormattedMessagein interfaceorg.apache.logging.log4j.message.Message
-
getFormat
- Specified by:
getFormatin interfaceorg.apache.logging.log4j.message.Message
-
getParameters
- Specified by:
getParametersin interfaceorg.apache.logging.log4j.message.Message
-
getThrowable
- Specified by:
getThrowablein interfaceorg.apache.logging.log4j.message.Message
-
formatTo
- Specified by:
formatToin interfaceorg.apache.logging.log4j.util.StringBuilderFormattable
-
adapt
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
builder
Returns the value of thebuilderrecord component.- Returns:
- the value of the
builderrecord component
-