net.sf.hibernate4gwt.rebind
Class AbstractGwtProxyGenerator

java.lang.Object
  extended by Generator
      extended by net.sf.hibernate4gwt.rebind.AbstractGwtProxyGenerator
Direct Known Subclasses:
Gwt14ProxyGenerator, Gwt15ProxyGenerator

public abstract class AbstractGwtProxyGenerator
extends Generator

Proxy generator for GWT

Author:
bruno.marchesson

Field Summary
protected  AdditionalCode _additionalCode
          Additional code
protected  java.lang.String _additionalCodePath
          Associated additional code file path
 
Constructor Summary
protected AbstractGwtProxyGenerator(java.lang.String filePath)
          Constructor
 
Method Summary
 java.lang.String generate(TreeLogger logger, GeneratorContext context, java.lang.String typeName)
           
protected  void generateAttribute(SourceWriter sourceWriter, Attribute attribute)
          Generates an additional attribute
protected  void generateMethod(SourceWriter sourceWriter, Method method)
          Generates an additional attribute
protected  void generateProxy(TreeLogger logger, SourceWriter sourceWriter, AdditionalCode additionalCode)
          Add additional code to the instrumented class
protected  SourceWriter getSourceWriter(TreeLogger logger, GeneratorContext context, java.lang.String packageName, java.lang.String className, java.lang.String superclassName, AdditionalCode additionalCode)
          Create the needed source writer
protected  boolean isLazyPojo(JClassType clazz)
          Check if the argument class already implements ILazyPojo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_additionalCodePath

protected java.lang.String _additionalCodePath
Associated additional code file path


_additionalCode

protected AdditionalCode _additionalCode
Additional code

Constructor Detail

AbstractGwtProxyGenerator

protected AbstractGwtProxyGenerator(java.lang.String filePath)
Constructor

Method Detail

generate

public java.lang.String generate(TreeLogger logger,
                                 GeneratorContext context,
                                 java.lang.String typeName)
                          throws UnableToCompleteException
Throws:
UnableToCompleteException

getSourceWriter

protected SourceWriter getSourceWriter(TreeLogger logger,
                                       GeneratorContext context,
                                       java.lang.String packageName,
                                       java.lang.String className,
                                       java.lang.String superclassName,
                                       AdditionalCode additionalCode)
Create the needed source writer


generateProxy

protected void generateProxy(TreeLogger logger,
                             SourceWriter sourceWriter,
                             AdditionalCode additionalCode)
Add additional code to the instrumented class

Parameters:
logger -
sourceWriter -
additionalCode -

generateAttribute

protected void generateAttribute(SourceWriter sourceWriter,
                                 Attribute attribute)
Generates an additional attribute

Parameters:
sourceWriter -
attribute -

generateMethod

protected void generateMethod(SourceWriter sourceWriter,
                              Method method)
Generates an additional attribute

Parameters:
sourceWriter -
attribute -

isLazyPojo

protected boolean isLazyPojo(JClassType clazz)
Check if the argument class already implements ILazyPojo

Parameters:
clazz -
Returns: