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 SupportingFile
doNotOverwrite()
Identifies this instance as referring to a supporting file which should not overwrite a file of the same name.boolean
equals(Object o)
TemplateFileType
getTemplateType()
Gets the type of templateint
hashCode()
boolean
isCanOverwrite()
void
setTemplateType(TemplateFileType templateType)
Sets the type of templateString
toString()
-
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:
setTemplateType
in classTemplateDefinition
- Parameters:
templateType
- aTemplateFileType
enum which defines the type of this template
-
getTemplateType
public TemplateFileType getTemplateType()
Gets the type of template- Overrides:
getTemplateType
in classTemplateDefinition
- Returns:
- a
TemplateFileType
enum which defines the type of this template.
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classTemplateDefinition
-
isCanOverwrite
public boolean isCanOverwrite()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classTemplateDefinition
-
toString
public String toString()
- Overrides:
toString
in classTemplateDefinition
-
-