jaxx.compiler.finalizers
Class DefaultFinalizer

java.lang.Object
  extended by jaxx.compiler.finalizers.DefaultFinalizer
All Implemented Interfaces:
JAXXCompilerFinalizer

public class DefaultFinalizer
extends java.lang.Object
implements JAXXCompilerFinalizer

This class is a refactoring of the JAXXCompiler.

We delegate now the generation of a JAXXObject to this class, the JAXXCompiler now only deals with the compilation of files.

Author:
chemit

Field Summary
protected static JavaField ACTIVE_BINDINGS_FIELD
          $activeBindings field
protected static JavaMethod ADD_PROPERTY_CHANGE_SUPPORT_METHOD
           
protected static JavaMethod ADD_PROPERTY_CHANGE_SUPPORT_NAMED_METHOD
           
protected static JavaField ALL_COMPONENTS_CREATED_FIELD
           
protected static JavaField BINDING_SOURCES_FIELD
           
protected static JavaField CONTEXT_INITIALIZED
           
protected static JavaMethod FIRE_PROPERTY_CHANGE_METHOD
           
protected static JavaMethod FIRE_PROPERTY_CHANGE_NAMED_METHOD
           
protected static JavaMethod GET_CONTEXT_VALUE_METHOD
           
protected static JavaMethod GET_CONTEXT_VALUE_NAMED_METHOD
           
protected static JavaMethod GET_JAXX_OBJECT_DESCRIPTOR_METHOD
           
protected static JavaMethod GET_OBJECT_BY_ID_METHOD
           
protected static JavaMethod GET_PARENT_CONTAINER_METHOD
           
protected static JavaMethod GET_PARENT_CONTAINER_MORE_METHOD
           
protected static JavaMethod GET_PROPERTY_CHANGE_SUPPORT_METHOD
           
protected static org.apache.commons.logging.Log log
          Logger
protected static JavaField OBJECT_MAP_FIELD
           
protected static JavaField PREVIOUS_VALUES_FIELD
           
protected static JavaMethod PROCESS_DATA_BINDING_METHOD
           
protected static JavaField PROPERTY_CHANGE_SUPPORT_FIELD
           
protected static JavaMethod REMOVE_CONTEXT_VALUE_METHOD
           
protected static JavaMethod REMOVE_CONTEXT_VALUE_NAMED_METHOD
           
protected static JavaMethod REMOVE_PROPERTY_CHANGE_SUPPORT_METHOD
           
protected static JavaMethod REMOVE_PROPERTY_CHANGE_SUPPORT_NAMED_METHOD
           
protected static JavaField SERIAL_VERSION_UID_FIELD
          serialVersionUID field
protected static JavaMethod SET_CONTEXT_VALUE_METHOD
           
protected static JavaMethod SET_CONTEXT_VALUE_NAMED_METHOD
           
 
Constructor Summary
DefaultFinalizer()
           
 
Method Summary
protected  void addEventHandlers(JAXXCompiler compiler, JavaFile javaFile)
           
protected  void addPropertyChangeSupport(CompiledObject root, JavaFile javaFile)
           
protected  JavaMethod createCompleteSetupMethod(JAXXCompiler compiler, JavaFile javaFile, java.lang.StringBuffer initDataBindings)
           
protected  JavaMethod createConstructor(JAXXCompiler compiler, java.lang.String className, boolean superclassIsJAXXObject)
           
protected  JavaMethod createConstructorWithInitialContext(JAXXCompiler compiler, java.lang.String className, boolean superclassIsJAXXObject)
           
 JavaMethod createInitializer(JAXXCompiler compiler)
           
protected  JavaField createJAXXObjectDescriptorField(JAXXCompiler compiler, JavaFile javaFile)
           
protected  JavaMethod createProcessDataBindingMethod(JAXXCompiler compiler, boolean superclassIsJAXXObject)
           
protected  void finalizeBindings(JAXXCompiler compiler, boolean superclassIsJAXXObject)
           
 void finalizeCompiler(CompiledObject root, JAXXCompiler compiler, JavaFile javaFile, java.lang.String packageName, java.lang.String className)
          Finalize compiler for a given compiler on the finalizer pass before any generation.
 void prepareJavaFile(CompiledObject root, JAXXCompiler compiler, JavaFile javaFile, java.lang.String packageName, java.lang.String className)
          Prepare java file after any compiler finalizer pass, says the last action before generation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log
Logger


SERIAL_VERSION_UID_FIELD

protected static final JavaField SERIAL_VERSION_UID_FIELD
serialVersionUID field


ACTIVE_BINDINGS_FIELD

protected static final JavaField ACTIVE_BINDINGS_FIELD
$activeBindings field


BINDING_SOURCES_FIELD

protected static final JavaField BINDING_SOURCES_FIELD

OBJECT_MAP_FIELD

protected static final JavaField OBJECT_MAP_FIELD

ALL_COMPONENTS_CREATED_FIELD

protected static final JavaField ALL_COMPONENTS_CREATED_FIELD

CONTEXT_INITIALIZED

protected static final JavaField CONTEXT_INITIALIZED

PREVIOUS_VALUES_FIELD

protected static final JavaField PREVIOUS_VALUES_FIELD

PROPERTY_CHANGE_SUPPORT_FIELD

protected static final JavaField PROPERTY_CHANGE_SUPPORT_FIELD

GET_CONTEXT_VALUE_METHOD

protected static final JavaMethod GET_CONTEXT_VALUE_METHOD

GET_CONTEXT_VALUE_NAMED_METHOD

protected static final JavaMethod GET_CONTEXT_VALUE_NAMED_METHOD

SET_CONTEXT_VALUE_NAMED_METHOD

protected static final JavaMethod SET_CONTEXT_VALUE_NAMED_METHOD

SET_CONTEXT_VALUE_METHOD

protected static final JavaMethod SET_CONTEXT_VALUE_METHOD

REMOVE_CONTEXT_VALUE_NAMED_METHOD

protected static final JavaMethod REMOVE_CONTEXT_VALUE_NAMED_METHOD

REMOVE_CONTEXT_VALUE_METHOD

protected static final JavaMethod REMOVE_CONTEXT_VALUE_METHOD

GET_PARENT_CONTAINER_MORE_METHOD

protected static final JavaMethod GET_PARENT_CONTAINER_MORE_METHOD

GET_PARENT_CONTAINER_METHOD

protected static final JavaMethod GET_PARENT_CONTAINER_METHOD

GET_OBJECT_BY_ID_METHOD

protected static final JavaMethod GET_OBJECT_BY_ID_METHOD

GET_JAXX_OBJECT_DESCRIPTOR_METHOD

protected static final JavaMethod GET_JAXX_OBJECT_DESCRIPTOR_METHOD

PROCESS_DATA_BINDING_METHOD

protected static final JavaMethod PROCESS_DATA_BINDING_METHOD

FIRE_PROPERTY_CHANGE_METHOD

protected static final JavaMethod FIRE_PROPERTY_CHANGE_METHOD

FIRE_PROPERTY_CHANGE_NAMED_METHOD

protected static final JavaMethod FIRE_PROPERTY_CHANGE_NAMED_METHOD

GET_PROPERTY_CHANGE_SUPPORT_METHOD

protected static final JavaMethod GET_PROPERTY_CHANGE_SUPPORT_METHOD

ADD_PROPERTY_CHANGE_SUPPORT_METHOD

protected static final JavaMethod ADD_PROPERTY_CHANGE_SUPPORT_METHOD

ADD_PROPERTY_CHANGE_SUPPORT_NAMED_METHOD

protected static final JavaMethod ADD_PROPERTY_CHANGE_SUPPORT_NAMED_METHOD

REMOVE_PROPERTY_CHANGE_SUPPORT_METHOD

protected static final JavaMethod REMOVE_PROPERTY_CHANGE_SUPPORT_METHOD

REMOVE_PROPERTY_CHANGE_SUPPORT_NAMED_METHOD

protected static final JavaMethod REMOVE_PROPERTY_CHANGE_SUPPORT_NAMED_METHOD
Constructor Detail

DefaultFinalizer

public DefaultFinalizer()
Method Detail

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.

Specified by:
finalizeCompiler in interface JAXXCompilerFinalizer
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.

Specified by:
prepareJavaFile in interface JAXXCompilerFinalizer
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

finalizeBindings

protected void finalizeBindings(JAXXCompiler compiler,
                                boolean superclassIsJAXXObject)

createJAXXObjectDescriptorField

protected JavaField createJAXXObjectDescriptorField(JAXXCompiler compiler,
                                                    JavaFile javaFile)

addPropertyChangeSupport

protected void addPropertyChangeSupport(CompiledObject root,
                                        JavaFile javaFile)

addEventHandlers

protected void addEventHandlers(JAXXCompiler compiler,
                                JavaFile javaFile)

createConstructor

protected JavaMethod createConstructor(JAXXCompiler compiler,
                                       java.lang.String className,
                                       boolean superclassIsJAXXObject)
                                throws CompilerException
Throws:
CompilerException

createConstructorWithInitialContext

protected JavaMethod createConstructorWithInitialContext(JAXXCompiler compiler,
                                                         java.lang.String className,
                                                         boolean superclassIsJAXXObject)
                                                  throws CompilerException
Throws:
CompilerException

createInitializer

public JavaMethod createInitializer(JAXXCompiler compiler)
                             throws CompilerException
Throws:
CompilerException

createCompleteSetupMethod

protected JavaMethod createCompleteSetupMethod(JAXXCompiler compiler,
                                               JavaFile javaFile,
                                               java.lang.StringBuffer initDataBindings)

createProcessDataBindingMethod

protected JavaMethod createProcessDataBindingMethod(JAXXCompiler compiler,
                                                    boolean superclassIsJAXXObject)


Copyright © 2008-2009 CodeLutin. All Rights Reserved.