Interface CompiledObjectDecorator

    • Method Detail

      • getName

        String getName()
        Returns:
        the name of the decorator (match the content of a decorator attribute value in a JAXX file)
      • createCompleteSetupMethod

        String createCompleteSetupMethod​(JAXXCompiler compiler,
                                         CompiledObject object,
                                         JavaFile javaFile)
        Obtain the setup code of the given object from the compiler to be inject in the generated method $completeSetup.
        Parameters:
        compiler - the compiler to use
        object - the compiled object to treate
        javaFile - the file to treate
        Returns:
        the code to inject in $completeSetup method in file
      • createInitializer

        boolean createInitializer​(JAXXCompiler compiler,
                                  CompiledObject root,
                                  CompiledObject object,
                                  StringBuilder code,
                                  boolean lastWasMethodCall)
        Create the initializer code for the given compiled object and inject it in the code.
        Parameters:
        compiler - the compiler to use
        root - the root compiled object of the jaxx file
        object - the compiled object to treate
        code - where to store code to inject
        lastWasMethodCall - true if last instruction call was a method call
        Returns:
        true if the last instruction was a method call
      • finalizeCompiler

        void finalizeCompiler​(JAXXCompiler compiler,
                              CompiledObject root,
                              CompiledObject object,
                              JavaFile javaFile,
                              String packageName,
                              String className,
                              String fullClassName)
                       throws ClassNotFoundException
        Finalize the given compiled object before any generation in the file.
        Parameters:
        compiler - the compiler to use
        root - the root compiled object of the jaxx file
        object - the compiled object to treate
        javaFile - the file to treate
        packageName - the package name
        className - the (simple ?) class name
        fullClassName - the fully class name
        Throws:
        ClassNotFoundException - if a class is not found
      • getCreationCode

        String getCreationCode​(JAXXCompiler compiler,
                               CompiledObject object)
                        throws CompilerException
        Obtain the creation code of the given object from the compiler to inject in generate method $initialize or createXXX in not inline.
        Parameters:
        compiler - the compiler to use
        object - the compiled object to treate
        Returns:
        the code to inject in $initialize (or in the createXXX in not inline) method to create the given object
        Throws:
        CompilerException - if any pb