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 SummaryFieldsModifier and TypeFieldDescriptionprivate final Consumer<StringBuilder>The field for thebuilderrecord component.private static final Object[]
- 
Constructor SummaryConstructorsConstructorDescriptionLogMessageAdapter(Consumer<StringBuilder> builder) Creates an instance of aLogMessageAdapterrecord class.
- 
Method SummaryModifier 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- 
builderThe field for thebuilderrecord component.
- 
EMPTY
 
- 
- 
Constructor Details- 
LogMessageAdapterCreates an instance of aLogMessageAdapterrecord class.- Parameters:
- builder- the value for the- builderrecord component
 
 
- 
- 
Method Details- 
getFormattedMessage- Specified by:
- getFormattedMessagein interface- org.apache.logging.log4j.message.Message
 
- 
getFormat- Specified by:
- getFormatin interface- org.apache.logging.log4j.message.Message
 
- 
getParameters- Specified by:
- getParametersin interface- org.apache.logging.log4j.message.Message
 
- 
getThrowable- Specified by:
- getThrowablein interface- org.apache.logging.log4j.message.Message
 
- 
formatTo- Specified by:
- formatToin interface- org.apache.logging.log4j.util.StringBuilderFormattable
 
- 
adapt
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
builderReturns the value of thebuilderrecord component.- Returns:
- the value of the builderrecord component
 
 
-