Record Class MethodHandleLogSink
java.lang.Object
java.lang.Record
dev.pfaff.log4truth.MethodHandleLogSink
- All Implemented Interfaces:
LogSink
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aMethodHandleLogSinkrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbind()Returns a bound method handle equivalent to theLogSink.emit(java.lang.String, dev.pfaff.log4truth.StringSupplier, java.lang.Throwable, java.util.List<java.lang.String>, java.lang.Thread)method of this sink.emit()Returns the value of theemitrecord component.voidemit(String source, StringSupplier message, @Nullable Throwable throwable, List<String> tags, Thread thread) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MethodHandleLogSink
Creates an instance of aMethodHandleLogSinkrecord class.- Parameters:
emit- the value for theemitrecord component
-
-
Method Details
-
emit
-
bind
Description copied from interface:LogSinkReturns a bound method handle equivalent to theLogSink.emit(java.lang.String, dev.pfaff.log4truth.StringSupplier, java.lang.Throwable, java.util.List<java.lang.String>, java.lang.Thread)method of this sink. -
toString
-
hashCode
-
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). -
emit
Returns the value of theemitrecord component.- Returns:
- the value of the
emitrecord component
-