Interface ClassGenerator.JavaFileGenerator

Enclosing interface:
ClassGenerator
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ClassGenerator.JavaFileGenerator
Strategy used to generate the java file for the generated class. Implementations of this interface are included as part of the key used to identify classes that have already been created and as such should be static final instances or implement a valid equals/hashCode.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.javapoet.JavaFile
    generateJavaFile(org.springframework.javapoet.ClassName className, GeneratedMethods methods)
    Generate the file JavaFile to be written.
    Return method names that must not be generated.
  • Method Details

    • generateJavaFile

      org.springframework.javapoet.JavaFile generateJavaFile(org.springframework.javapoet.ClassName className, GeneratedMethods methods)
      Generate the file JavaFile to be written.
      Parameters:
      className - the class name of the file
      methods - the generated methods that must be included
      Returns:
      the generated files
    • getReservedMethodNames

      default Collection<String> getReservedMethodNames()
      Return method names that must not be generated.
      Returns:
      the reserved method names