Class EclipseCollectionsCodeGenerator
java.lang.Object
org.eclipse.collections.codegenerator.EclipseCollectionsCodeGenerator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ErrorListenerprivate final Stringprivate intprivate final Fileprivate final String -
Constructor Summary
ConstructorsConstructorDescriptionEclipseCollectionsCodeGenerator(String templateDirectory, List<URL> classPathURLs, ErrorListener errorListener, File outputDirectory, String fileExtension) -
Method Summary
Modifier and TypeMethodDescriptionprivate static longcalculateChecksum(String string) private voidcheckSumClassContentsAndWrite(String classContents, File outputFile) private FileconstructTargetPath(org.stringtemplate.v4.STGroupFile templateFile) private StringexecuteTemplate(org.stringtemplate.v4.STGroupFile templateFile, String templateName, Primitive primitive) private StringexecuteTemplate(org.stringtemplate.v4.STGroupFile templateFile, String templateName, Primitive primitive1, Primitive primitive2) private org.stringtemplate.v4.STfindTemplate(org.stringtemplate.v4.STGroupFile templateFile, String templateName) intGenerates code and only write contents to disk which differ from the current file contents.private booleanrenderBooleanTemplate(org.stringtemplate.v4.STGroupFile templateFile, String templateName) private static booleansourceFileExists(File outputFile) private voidwriteFileAndChecksum(File outputFile, String output, long checksumValue, Path outputChecksumPath, boolean outputFileMustExist)
-
Field Details
-
templateDirectory
-
classPathURLs
-
errorListener
-
outputDirectory
-
fileExtension
-
numFileWritten
private int numFileWritten
-
-
Constructor Details
-
EclipseCollectionsCodeGenerator
-
-
Method Details
-
generateFiles
public int generateFiles()Generates code and only write contents to disk which differ from the current file contents.- Returns:
- The number of files written.
-
checkSumClassContentsAndWrite
-
calculateChecksum
-
writeFileAndChecksum
-
executeTemplate
-
executeTemplate
-
findTemplate
private org.stringtemplate.v4.ST findTemplate(org.stringtemplate.v4.STGroupFile templateFile, String templateName) -
renderBooleanTemplate
private boolean renderBooleanTemplate(org.stringtemplate.v4.STGroupFile templateFile, String templateName) -
constructTargetPath
-
sourceFileExists
-