Class ValidatorFinalizer

java.lang.Object
jaxx.compiler.finalizers.AbstractFinalizer
jaxx.compiler.finalizers.ValidatorFinalizer
All Implemented Interfaces:
JAXXCompilerFinalizer

@Component(role=JAXXCompilerFinalizer.class,
           hint="validators")
public class ValidatorFinalizer
extends AbstractFinalizer
To finalize validators fields.
Author:
Tony Chemit - chemit@codelutin.com
  • Field Details

    • VALIDATOR_IDS_FIELD

      protected static final JavaField VALIDATOR_IDS_FIELD
  • Constructor Details

    • ValidatorFinalizer

      public ValidatorFinalizer()
  • Method Details

    • accept

      public boolean accept​(JAXXCompiler compiler)
      Description copied from interface: JAXXCompilerFinalizer
      Test if the finalizer must be apply on the given compiler.
      Parameters:
      compiler - the compiler
      Returns:
      true if the finalizer must be apply of compiler
    • finalizeCompiler

      public void finalizeCompiler​(CompiledObject root, JAXXCompiler compiler, JavaFile javaFile, java.lang.String packageName, java.lang.String className)
      Description copied from interface: JAXXCompilerFinalizer
      Finalize compiler for a given compiler on the finalizer pass before any generation.
      Parameters:
      root - the root object
      compiler - the current compiler
      javaFile - the java file to generate
      packageName - the package name of the file to generate
      className - the class name of the file to generate
    • prepareJavaFile

      public void prepareJavaFile​(CompiledObject root, JAXXCompiler compiler, JavaFile javaFile, java.lang.String packageName, java.lang.String className) throws java.lang.ClassNotFoundException
      Description copied from interface: JAXXCompilerFinalizer
      Prepare java file after any compiler finalizer pass, says the last action before generation.
      Parameters:
      root - the root object
      compiler - the current compiler
      javaFile - the java file to generate
      packageName - the package name of the file to generate
      className - the class name of the file to generate
      Throws:
      java.lang.ClassNotFoundException
    • registerValidator

      public void registerValidator​(BeanValidatorHandler.CompiledBeanValidator validator, JAXXCompiler compiler, JavaFile javaFile)