Package org.openapitools.codegen
Class SupportingFile
- java.lang.Object
-
- org.openapitools.codegen.api.TemplateDefinition
-
- org.openapitools.codegen.SupportingFile
-
public class SupportingFile extends TemplateDefinition
Defines the template definition for a "supporting file", that is any file which is generic and not bound to api/model definitions and their relevant docs or tests. Supporting files are generated once for an entire application while api/model bound definitions are generated multiple times according to their target use.
-
-
Field Summary
-
Fields inherited from class org.openapitools.codegen.api.TemplateDefinition
templateType
-
-
Constructor Summary
Constructors Constructor Description SupportingFile(String templateFile, String destinationFilename)SupportingFile(String templateFile, String folder, String destinationFilename)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SupportingFiledoNotOverwrite()Identifies this instance as referring to a supporting file which should not overwrite a file of the same name.booleanequals(Object o)TemplateFileTypegetTemplateType()Gets the type of templateinthashCode()booleanisCanOverwrite()voidsetTemplateType(TemplateFileType templateType)Sets the type of templateStringtoString()-
Methods inherited from class org.openapitools.codegen.api.TemplateDefinition
getDestinationFilename, getFolder, getTemplateFile
-
-
-
-
Method Detail
-
doNotOverwrite
public SupportingFile doNotOverwrite()
Identifies this instance as referring to a supporting file which should not overwrite a file of the same name.- Returns:
- This object, for chaining.
-
setTemplateType
public void setTemplateType(TemplateFileType templateType)
Sets the type of template- Overrides:
setTemplateTypein classTemplateDefinition- Parameters:
templateType- aTemplateFileTypeenum which defines the type of this template
-
getTemplateType
public TemplateFileType getTemplateType()
Gets the type of template- Overrides:
getTemplateTypein classTemplateDefinition- Returns:
- a
TemplateFileTypeenum which defines the type of this template.
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classTemplateDefinition
-
isCanOverwrite
public boolean isCanOverwrite()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classTemplateDefinition
-
toString
public String toString()
- Overrides:
toStringin classTemplateDefinition
-
-