Package dk.mada.jaxrs.openapi
Record Class ParserTypeComposite
java.lang.Object
java.lang.Record
dk.mada.jaxrs.openapi.ParserTypeComposite
- Record Components:
typeName
- the type namecontainsTypes
- the parser references to the composite parts of this type
- All Implemented Interfaces:
Type
public record ParserTypeComposite(TypeName typeName, List<ParserTypeRef> containsTypes)
extends Record
implements Type
Type representing a composite class (schema with allOf) during parsing.
The composite may include both internal properties (basically captured as an
anonymous placeholder DTO that will not be part of the final model) and
references to types that have not been resolved yet. So a TypeComposite DTO
needs to be constructed in two steps;
(1) during parsing, where the internal properties can be copied from the
placeholder DTO, and (2) during resolving, where the referenced DTOs are now
known, and can be used for copying their properties (or extension).
-
Constructor Summary
ConstructorsConstructorDescriptionParserTypeComposite
(TypeName typeName, List<ParserTypeRef> containsTypes) Creates an instance of aParserTypeComposite
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontainsTypes
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns a list of the externally referenced type names.final int
hashCode()
Returns a hash code value for this object.Returns a list of the internal DTOs in this composite.final String
toString()
Returns a string representation of this record class.typeName()
Returns the value of thetypeName
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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
-
ParserTypeComposite
Creates an instance of aParserTypeComposite
record class.- Parameters:
typeName
- the value for thetypeName
record componentcontainsTypes
- the value for thecontainsTypes
record component
-
-
Method Details
-
internalDtos
Returns a list of the internal DTOs in this composite. This can be called during parsing.- Returns:
- a list of the internal DTOs in this composite
-
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 thetypeName
record component. -
containsTypes
Returns the value of thecontainsTypes
record component.- Returns:
- the value of the
containsTypes
record component
-