Package io.micronaut.jaxrs.common
Record Class JaxRsMessageBodyReaderDefinition
java.lang.Object
java.lang.Record
io.micronaut.jaxrs.common.JaxRsMessageBodyReaderDefinition
- Record Components:
type
- The typemessageBodyReader
- Teh readerpriority
- The order
- All Implemented Interfaces:
Ordered
@Internal
public record JaxRsMessageBodyReaderDefinition(Argument<?> type, MessageBodyReader<?> messageBodyReader, int priority)
extends Record
implements Ordered
The simple definition for message body reader.
- Since:
- 4.6
- Author:
- Denis Stepanov
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionJaxRsMessageBodyReaderDefinition
(Argument<?> type, MessageBodyReader<?> messageBodyReader, int priority) Creates an instance of aJaxRsMessageBodyReaderDefinition
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of themessageBodyReader
record component.int
priority()
Returns the value of thepriority
record component.final String
toString()
Returns a string representation of this record class.Argument<?>
type()
Returns the value of thetype
record component.
-
Constructor Details
-
JaxRsMessageBodyReaderDefinition
public JaxRsMessageBodyReaderDefinition(Argument<?> type, MessageBodyReader<?> messageBodyReader, int priority) Creates an instance of aJaxRsMessageBodyReaderDefinition
record class.- Parameters:
type
- the value for thetype
record componentmessageBodyReader
- the value for themessageBodyReader
record componentpriority
- the value for thepriority
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
messageBodyReader
Returns the value of themessageBodyReader
record component.- Returns:
- the value of the
messageBodyReader
record component
-
priority
public int priority()Returns the value of thepriority
record component.- Returns:
- the value of the
priority
record component
-