Class FilerUtils
java.lang.Object
nl.datasteel.crudcraft.codegen.util.FilerUtils
Utilities for dealing with
Filer
instances.-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
resourceExists
(Filer filer, String pkg, String fileName) Returns true if the given class-file already exists in the generated-sources folder.static void
writeJavaFile
(com.squareup.javapoet.JavaFile javaFile, Filer filer, Messager messager) Writes the givenJavaFile
using the suppliedFiler
.
-
Method Details
-
resourceExists
Returns true if the given class-file already exists in the generated-sources folder. -
writeJavaFile
public static void writeJavaFile(com.squareup.javapoet.JavaFile javaFile, Filer filer, Messager messager) Writes the givenJavaFile
using the suppliedFiler
. Any IO error will be reported through the providedMessager
.- Parameters:
javaFile
- the file to writefiler
- the filer to usemessager
- optional messager for error reporting
-