Author: tchemit Date: 2009-12-02 14:09:57 +0100 (Wed, 02 Dec 2009) New Revision: 1672 Modified: branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/CompiledObjectDecorator.java Log: javadoc on contract CompiledObjectDecorator Modified: branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/CompiledObjectDecorator.java =================================================================== --- branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/CompiledObjectDecorator.java 2009-12-02 12:56:47 UTC (rev 1671) +++ branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/CompiledObjectDecorator.java 2009-12-02 13:09:57 UTC (rev 1672) @@ -23,63 +23,65 @@ import jaxx.compiler.java.JavaFile; /** - * * Contract of compiled object decorator at generation time. + * <p/> + * Note : The implementation of this class must be stateless. * - * Note : The implementation of this class must be stateless. - * * @author tony * @since 1.2 */ public interface CompiledObjectDecorator { /** - * * @return the name of the decorator (match the content of a decorator - * attribute value in a JAXX file) + * attribute value in a JAXX file) */ String getName(); /** + * Obtain the setup code of the given {@code object} from the {@code compiler} to be inject in the generated + * method {@code $completeSetup}. * - * @param compiler - * @param object - * @param javaFile -// * @param initDataBindings - * @return + * @param compiler the compiler to use + * @param object the compiled object to treate + * @param javaFile the file to treate + * @return the code to inject in $completeSetup method in file */ String createCompleteSetupMethod(JAXXCompiler compiler, CompiledObject object, JavaFile javaFile); -// String createCompleteSetupMethod(JAXXCompiler compiler, CompiledObject object, JavaFile javaFile, StringBuffer initDataBindings); /** + * Create the initializer code for the given compiled {@code object} and inject it in the {@code code}. * - * @param compiler - * @param root - * @param object - * @param code - * @param lastWasMethodCall - * @return + * @param compiler the compiler to use + * @param root the root compiled object of the jaxx file + * @param object the compiled object to treate + * @param code where to store code to inject + * @param lastWasMethodCall {@code true} if last instruction call was a method call + * @return {@code true} if the last instruction was a method call */ boolean createInitializer(JAXXCompiler compiler, CompiledObject root, CompiledObject object, StringBuffer code, boolean lastWasMethodCall); /** + * Finalize the given compiled object before any generation in the {@code file}. * - * @param compiler - * @param root - * @param object - * @param javaFile - * @param packageName - * @param className - * @param fullClassName + * @param compiler the compiler to use + * @param root the root compiled object of the jaxx file + * @param object the compiled object to treate + * @param javaFile the file to treate + * @param packageName the package name + * @param className the (simple ?) class name + * @param fullClassName the fully class name */ void finalizeCompiler(JAXXCompiler compiler, CompiledObject root, CompiledObject object, JavaFile javaFile, String packageName, String className, String fullClassName); /** + * Obtain the creation code of the given {@code object} from the {@code compiler} to inject in generate method + * {@code $initialize} or {@code createXXX} in not inline. * - * @param compiler - * @param object - * @return - * @throws CompilerException + * @param compiler the compiler to use + * @param object the compiled object to treate + * @return the code to inject in $initialize (or in the createXXX in not inline) method to create the given object + * @throws CompilerException if any pb */ String getCreationCode(JAXXCompiler compiler, CompiledObject object) throws CompilerException; }