Class FilerUtils
java.lang.Object
nl.datasteel.crudcraft.codegen.util.FilerUtils
Utilities for dealing with
Filer instances.-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanresourceExists(Filer filer, String pkg, String fileName) Returns true if the given class-file already exists in the generated-sources folder.static voidwriteJavaFile(com.squareup.javapoet.JavaFile javaFile, Filer filer, Messager messager) Writes the givenJavaFileusing 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 givenJavaFileusing 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
-