Record Class MachineError.SerializationError
java.lang.Object
java.lang.Record
fr.robie.machineengine.api.error.MachineError.SerializationError
- All Implemented Interfaces:
MachineError
- Enclosing interface:
MachineError
public static record MachineError.SerializationError(@NotNull String message, @NotNull String path)
extends Record
implements MachineError
Data could not be encoded or decoded.
-
Nested Class Summary
Nested classes/interfaces inherited from interface MachineError
MachineError.Generic, MachineError.InsufficientResource, MachineError.InvalidConfiguration, MachineError.InvalidDefinition, MachineError.MissingResource, MachineError.SerializationError, MachineError.TransferRejected, MachineError.WrongThread -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSerializationError(@NotNull String message, @NotNull String path) Creates an instance of aSerializationErrorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull MachineError.SerializationError@NotNull net.kyori.adventure.key.Keycode()Stable machine-readable code, e.g.context()Debugging details.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringmessage()Returns the value of themessagerecord component.@NotNull Stringpath()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.@NotNull MachineError.SerializationErrorMethods inherited from interface MachineError
format
-
Field Details
-
CODE
public static final net.kyori.adventure.key.Key CODE
-
-
Constructor Details
-
SerializationError
-
-
Method Details
-
at
@NotNull public static @NotNull MachineError.SerializationError at(@NotNull @NotNull String path, @NotNull @NotNull String message) -
code
@NotNull public @NotNull net.kyori.adventure.key.Key code()Description copied from interface:MachineErrorStable machine-readable code, e.g.machineengine:insufficient_resource.- Specified by:
codein interfaceMachineError
-
context
Description copied from interface:MachineErrorDebugging details.- Specified by:
contextin interfaceMachineError
-
under
- Returns:
- this error with
segmentprepended to its path
-
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). -
message
Returns the value of themessagerecord component.- Specified by:
messagein interfaceMachineError- Returns:
- the value of the
messagerecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-