Class ValidatorFinalizer
- java.lang.Object
-
- org.nuiton.jaxx.compiler.finalizers.AbstractFinalizer
-
- org.nuiton.jaxx.compiler.finalizers.ValidatorFinalizer
-
- All Implemented Interfaces:
JAXXCompilerFinalizer
@AutoService(JAXXCompilerFinalizer.class) @Component(hint="validators", role=JAXXCompilerFinalizer.class) public class ValidatorFinalizer extends AbstractFinalizer
To finalize validators fields.- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Field Summary
Fields Modifier and Type Field Description protected static JavaFieldVALIDATOR_IDS_FIELD-
Fields inherited from interface org.nuiton.jaxx.compiler.finalizers.JAXXCompilerFinalizer
TYPE_BOOLEAN, TYPE_OBJECT, TYPE_STRING, TYPE_VOID
-
-
Constructor Summary
Constructors Constructor Description ValidatorFinalizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(JAXXCompiler compiler)Test if the finalizer must be apply on the givencompiler.voidfinalizeCompiler(CompiledObject root, JAXXCompiler compiler, JavaFile javaFile, String packageName, String className)Finalize compiler for a given compiler on the finalizer pass before any generation.voidprepareJavaFile(CompiledObject root, JAXXCompiler compiler, JavaFile javaFile, String packageName, String className)Prepare java file after any compiler finalizer pass, says the last action before generation.voidregisterValidator(BeanValidatorHandler.CompiledBeanValidator validator, JAXXCompiler compiler, JavaFile javaFile)-
Methods inherited from class org.nuiton.jaxx.compiler.finalizers.AbstractFinalizer
addField, addMethod, addSimpleField
-
-
-
-
Field Detail
-
VALIDATOR_IDS_FIELD
protected static final JavaField VALIDATOR_IDS_FIELD
-
-
Method Detail
-
accept
public boolean accept(JAXXCompiler compiler)
Description copied from interface:JAXXCompilerFinalizerTest if the finalizer must be apply on the givencompiler.- Parameters:
compiler- the compiler- Returns:
trueif the finalizer must be apply of compiler
-
finalizeCompiler
public void finalizeCompiler(CompiledObject root, JAXXCompiler compiler, JavaFile javaFile, String packageName, String className)
Description copied from interface:JAXXCompilerFinalizerFinalize compiler for a given compiler on the finalizer pass before any generation.- Parameters:
root- the root objectcompiler- the current compilerjavaFile- the java file to generatepackageName- the package name of the file to generateclassName- the class name of the file to generate
-
prepareJavaFile
public void prepareJavaFile(CompiledObject root, JAXXCompiler compiler, JavaFile javaFile, String packageName, String className)
Description copied from interface:JAXXCompilerFinalizerPrepare java file after any compiler finalizer pass, says the last action before generation.- Parameters:
root- the root objectcompiler- the current compilerjavaFile- the java file to generatepackageName- the package name of the file to generateclassName- the class name of the file to generate
-
registerValidator
public void registerValidator(BeanValidatorHandler.CompiledBeanValidator validator, JAXXCompiler compiler, JavaFile javaFile)
-
-