Record Class JsonRpcResponse.JsonRpcError
java.lang.Object
java.lang.Record
net.mcreator.io.mcp.protocol.JsonRpcResponse.JsonRpcError
- Enclosing class:
JsonRpcResponse
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionJsonRpcError(int code, String message) JsonRpcError(int code, String message, com.google.gson.JsonElement data) Creates an instance of aJsonRpcErrorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcode()Returns the value of thecoderecord component.com.google.gson.JsonElementdata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
PARSE_ERROR
public static final int PARSE_ERROR- See Also:
-
INVALID_REQUEST
public static final int INVALID_REQUEST- See Also:
-
METHOD_NOT_FOUND
public static final int METHOD_NOT_FOUND- See Also:
-
INVALID_PARAMS
public static final int INVALID_PARAMS- See Also:
-
INTERNAL_ERROR
public static final int INTERNAL_ERROR- See Also:
-
-
Constructor Details
-
JsonRpcError
-
JsonRpcError
Creates an instance of aJsonRpcErrorrecord class.- Parameters:
code- the value for thecoderecord componentmessage- the value for themessagerecord componentdata- the value for thedatarecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
code
public int code()Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
data
public com.google.gson.JsonElement data()Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-