Record Class Trace
java.lang.Object
java.lang.Record
org.geysermc.conduit.Trace
- Record Components:
returned- the value returnedcalls- the instance calls made, in orderloader- the loader the value was read from
public record Trace(Value returned, List<Value.InstanceCall> calls, ClassLoader loader)
extends Record
The result of evaluating a lambda or method reference, along with every instance call made
while doing so.
Take a Supplier<Trace> in an Intercept handler to receive this instead of a
conduit, for when the calls themselves matter as much as the value returned.
-
Constructor Summary
ConstructorsConstructorDescriptionTrace(Value returned, List<Value.InstanceCall> calls, ClassLoader loader) Creates an instance of aTracerecord class. -
Method Summary
Modifier and TypeMethodDescription<T> TViews the returned value through a conduit, along with the calls recorded while producing it.calls()Returns the value of thecallsrecord component.Filters the recorded calls down to those made to one method.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.loader()Returns the value of theloaderrecord component.returned()Returns the value of thereturnedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
as
Views the returned value through a conduit, along with the calls recorded while producing it.- Type Parameters:
T- the conduit type- Parameters:
conduit- the conduit interface- Returns:
- the conduit, or null if the value can't be viewed as one
-
calls
Filters the recorded calls down to those made to one method.- Parameters:
method- the method name- Returns:
- the recorded calls to methods with that name
-
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). -
returned
-
calls
-
loader
-