Record Class OpenApiDefInfo
java.lang.Object
java.lang.Record
io.github.torand.openapi2java.model.OpenApiDefInfo
- Record Components:
name- the application name.imports- the imports required by the OpenAPI definition.annotations- the annotations decorating this OpenAPI definition.
- All Implemented Interfaces:
EntityInfo,ImportsSupplier
public record OpenApiDefInfo(String name, ImportInfo imports, List<AnnotationInfo> annotations)
extends Record
implements EntityInfo, ImportsSupplier
Describes an OpenAPI definition.
-
Constructor Summary
ConstructorsConstructorDescriptionOpenApiDefInfo(String name) Constructs anOpenApiDefInfoobject.OpenApiDefInfo(String name, ImportInfo imports, List<AnnotationInfo> annotations) Creates an instance of aOpenApiDefInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionGets the complete set of normal imports for this entity and its sub-entities.Gets the complete set of static imports for this entity and its sub-entities.Returns the value of theannotationsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.imports()Returns the value of theimportsrecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.withAddedAnnotation(AnnotationInfo annotation) Returns a newOpenApiDefInfoobject with specified annotation added.withAddedNormalImport(String normalImport) Returns a newOpenApiDefInfoobject with specified normal import added.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.torand.openapi2java.model.EntityInfo
aggregatedImports, annotationsAsStrings
-
Constructor Details
-
OpenApiDefInfo
Constructs anOpenApiDefInfoobject.- Parameters:
name- the application name.
-
OpenApiDefInfo
Creates an instance of aOpenApiDefInforecord class.- Parameters:
name- the value for thenamerecord componentimports- the value for theimportsrecord componentannotations- the value for theannotationsrecord component
-
-
Method Details
-
withAddedNormalImport
Returns a newOpenApiDefInfoobject with specified normal import added.- Parameters:
normalImport- the import to add.- Returns:
- the new and updated
OpenApiDefInfoobject.
-
withAddedAnnotation
Returns a newOpenApiDefInfoobject with specified annotation added.- Parameters:
annotation- the annotation to add.- Returns:
- the new and updated
OpenApiDefInfoobject.
-
aggregatedNormalImports
Description copied from interface:EntityInfoGets the complete set of normal imports for this entity and its sub-entities.- Specified by:
aggregatedNormalImportsin interfaceEntityInfo- Returns:
- the aggregated set of normal imports.
-
aggregatedStaticImports
Description copied from interface:EntityInfoGets the complete set of static imports for this entity and its sub-entities.- Specified by:
aggregatedStaticImportsin interfaceEntityInfo- Returns:
- the aggregated set of static imports.
-
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
imports
Returns the value of theimportsrecord component.- Specified by:
importsin interfaceImportsSupplier- Returns:
- the value of the
importsrecord component
-
annotations
Returns the value of theannotationsrecord component.- Specified by:
annotationsin interfaceEntityInfo- Returns:
- the value of the
annotationsrecord component
-