Record Class Summary
java.lang.Object
java.lang.Record
org.geysermc.conduit.Summary
- Record Components:
returned- the value returned, or null for a void method or one that never returnsassignments- the fields assigned, each once with its final value, in the order first assignedinvocations- the calls made that return nothing and could not be followed, in order
public record Summary(@Nullable Value returned, List<Summary.Assignment> assignments, List<Summary.Invocation> invocations)
extends Record
What a method does from its bytecode without running it.
Values are expressed over the method's inputs, which are: Value.This, Value.Parameter,
and then Value.InstanceField for a field as it was before the method ran. Branches become
Value.Conditional, and a field assigned on only some paths keeps its earlier value on the
others.
Summary summary = vm.summarize("com.example.Dial", "turn", null);
for (Summary.Assignment assignment : summary.assignments()) {
System.out.println(assignment.target() + "." + assignment.field() + " = " + assignment.value());
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA field left assigned once the method returns.static final recordA call that returns nothing, made into code that could not be followed. -
Constructor Summary
ConstructorsConstructorDescriptionSummary(@Nullable Value returned, List<Summary.Assignment> assignments, List<Summary.Invocation> invocations) Creates an instance of aSummaryrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable ValueFinds the final value of a field assigned on an object.Returns the value of theassignmentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinvocationsrecord component.@Nullable Valuereturned()Returns the value of thereturnedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Summary
public Summary(@Nullable @Nullable Value returned, List<Summary.Assignment> assignments, List<Summary.Invocation> invocations) Creates an instance of aSummaryrecord class.- Parameters:
returned- the value for thereturnedrecord componentassignments- the value for theassignmentsrecord componentinvocations- the value for theinvocationsrecord component
-
-
Method Details
-
assigned
-
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
-
assignments
Returns the value of theassignmentsrecord component.- Returns:
- the value of the
assignmentsrecord component
-
invocations
Returns the value of theinvocationsrecord component.- Returns:
- the value of the
invocationsrecord component
-