Package dk.mada.jaxrs.openapi
Record Class ParserTypeCombined
java.lang.Object
java.lang.Record
dk.mada.jaxrs.openapi.ParserTypeCombined
- Record Components:
typeName- the class type namecombinesTypes- the parser references combined in this type
- All Implemented Interfaces:
Type
public record ParserTypeCombined(TypeName typeName, List<ParserTypeRef> combinesTypes)
extends Record
implements Type
Type representing a synthetic combined class during parsing.
This comes from properties that may have oneof-references to multiple DTOs but no discriminator. Solve by
(inelegantly) combining all properties from referenced DTOs into a synthetic DTO.
May be able to merge with ParserTypeComposite.
-
Constructor Summary
ConstructorsConstructorDescriptionParserTypeCombined(TypeName typeName, List<ParserTypeRef> combinesTypes) Creates an instance of aParserTypeCombinedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecombinesTypesrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns a list of the externally referenced type names.final inthashCode()Returns a hash code value for this object.Returns a list of the referenced DTOs in this combined DTO.final StringtoString()Returns a string representation of this record class.typeName()Returns the value of thetypeNamerecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dk.mada.jaxrs.model.types.Type
isBigDecimal, isContainer, isDate, isDateTime, isDto, isEnum, isPlainObject, isPrimitive, isPrimitive, isTime, isUUID, isValidation, isVoid, neededImports, wrapperTypeName
-
Constructor Details
-
ParserTypeCombined
Creates an instance of aParserTypeCombinedrecord class.- Parameters:
typeName- the value for thetypeNamerecord componentcombinesTypes- the value for thecombinesTypesrecord component
-
-
Method Details
-
internalDtos
Returns a list of the referenced DTOs in this combined DTO. This can be called during parsing.- Returns:
- a list of the referenced DTOs in this combined DTO
-
externalDtoReferences
Returns a list of the externally referenced type names.- Returns:
- a list of the externally referenced type names
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
typeName
Returns the value of thetypeNamerecord component. -
combinesTypes
Returns the value of thecombinesTypesrecord component.- Returns:
- the value of the
combinesTypesrecord component
-