Package io.swagger.codegen
Class AbstractGenerator
- java.lang.Object
-
- io.swagger.codegen.AbstractGenerator
-
- Direct Known Subclasses:
DefaultGenerator
,MetaGenerator
public abstract class AbstractGenerator extends Object
-
-
Constructor Summary
Constructors Constructor Description AbstractGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
embeddedTemplateExists(String name)
String
getCPResourcePath(String name)
String
getFullTemplateFile(CodegenConfig config, String templateFile)
Get the template file path with template dir prepended, and use the library template if exists.Reader
getTemplateReader(String name)
String
readResourceContents(String resourceFilePath)
String
readTemplate(String name)
File
writeToFile(String filename, String contents)
-
-
-
Method Detail
-
writeToFile
public File writeToFile(String filename, String contents) throws IOException
- Throws:
IOException
-
getFullTemplateFile
public String getFullTemplateFile(CodegenConfig config, String templateFile)
Get the template file path with template dir prepended, and use the library template if exists.- Parameters:
config
- Codegen configtemplateFile
- Template file- Returns:
- String Full template file path
-
embeddedTemplateExists
public boolean embeddedTemplateExists(String name)
-
-