Class FilerUtils

java.lang.Object
nl.datasteel.crudcraft.codegen.util.FilerUtils

public final class FilerUtils extends Object
Utilities for dealing with Filer instances.
  • Method Details

    • resourceExists

      public static boolean resourceExists(Filer filer, String pkg, String fileName)
      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 given JavaFile using the supplied Filer. Any IO error will be reported through the provided Messager.
      Parameters:
      javaFile - the file to write
      filer - the filer to use
      messager - optional messager for error reporting