Class GenerateConstructorsTask


  • public class GenerateConstructorsTask
    extends JAXXEngineTask
    Task to execute just after finalize task to create all constructors for any compiler. In fact, we can not compute constructor in one time since some compiler may need of the constructors of previous compiler... This task will compute all constructors to generate.
    Since:
    2.4
    Author:
    Tony Chemit - dev@tchemit.fr
    See Also:
    JavaConstructor
    • Constructor Detail

      • GenerateConstructorsTask

        public GenerateConstructorsTask()
    • Method Detail

      • perform

        public boolean perform​(JAXXEngine engine)
                        throws Exception
        Description copied from class: JAXXEngineTask
        Performs the task on the given engine.
        Specified by:
        perform in class JAXXEngineTask
        Parameters:
        engine - the engine to use
        Returns:
        false if task failed (with no exception), true otherwise.
        Throws:
        Exception - if any error
      • addConstructorsForNoneSuperClassJaxx

        protected void addConstructorsForNoneSuperClassJaxx​(JAXXEngine engine,
                                                            JAXXCompiler compiler)
                                                     throws ClassNotFoundException,
                                                            IllegalStateException
        To add constructor on the given compiler, knowing that the super class of it is not a jaxx class. In this mode, we takes all the constructors of the parent (if parent has some!) and for each of them add the simple one and another one with first parameter a JAXXContext.
        Parameters:
        engine - the current engine which compiled compiler
        compiler - the current compiler to treat
        Throws:
        ClassNotFoundException - if a class could not be found (when wanted to have extact type for constructor parameters)
        IllegalStateException - if given compiler has a super JAXX class.
      • addConstructorsForSuperClassJaxx

        protected void addConstructorsForSuperClassJaxx​(JAXXEngine engine,
                                                        JAXXCompiler compiler,
                                                        JAXXCompiler parentCompiler)
                                                 throws ClassNotFoundException,
                                                        IllegalStateException
        To add constructor on the given compiler, knowing that the super class of it is a jaxx class. In this mode, we takes all the constructors of the parent (if parent has some!) and for each of them add the simple one and another one with first parameter a JAXXContext.
        Parameters:
        engine - the current engine which compiled compiler
        compiler - the current compiler to treat
        parentCompiler - the compiler of the super class (can be null if super class was not generated by the given engine).
        Throws:
        ClassNotFoundException - if a class could not be found (when wanted to have extact type for constructor parameters)
        IllegalStateException - if given compiler has not a super JAXX class.