Class ExceptionToErrorMappingProviderGenerator

All Implemented Interfaces:
ClassGenerator

public class ExceptionToErrorMappingProviderGenerator extends AbstractSchemaClassGenerator<ObjectDefinition>
  • Constructor Details

    • ExceptionToErrorMappingProviderGenerator

      public ExceptionToErrorMappingProviderGenerator(ProcessedSchema processedSchema)
  • Method Details

    • generate

      public TypeSpec generate(ObjectDefinition target)
      Specified by:
      generate in class AbstractSchemaClassGenerator<ObjectDefinition>
      Parameters:
      target - A GenerationTarget object representing a source from which a class should be generated.
      Returns:
      A complete class in the form of a javapoet TypeSpec.
    • generateAll

      public List<TypeSpec> generateAll()
      Description copied from interface: ClassGenerator
      Generate the classes and return the list of TypeSpecs.
    • getDefaultSaveDirectoryName

      public String getDefaultSaveDirectoryName()
      Returns:
      The final directory path within the package where the classes are ultimately saved.
    • getFileNameSuffix

      public String getFileNameSuffix()
      Returns:
      The suffix that is to be added to the end of file names generated by this class.
    • getSpec

      public TypeSpec.Builder getSpec(String className, List<? extends MethodGenerator> generators)
      Specified by:
      getSpec in interface ClassGenerator
      Overrides:
      getSpec in class AbstractClassGenerator
      Parameters:
      className - The name of the class.
      generators - List of method generators that this class should use to generate its methods.
      Returns:
      A completed TypeSpec.Builder for this class, where all methods have already been added.