com.google.gwt.user.rebind
Class AbstractGeneratorClassCreator

java.lang.Object
  extended by com.google.gwt.user.rebind.AbstractSourceCreator
      extended by com.google.gwt.user.rebind.AbstractGeneratorClassCreator

public abstract class AbstractGeneratorClassCreator
extends AbstractSourceCreator

Abstract functionality needed to create classes needed to supply generators.


Constructor Summary
AbstractGeneratorClassCreator(SourceWriter writer, JClassType targetClass)
          Creates a new class creator, supplies a place to write the class, the interface to conform to, and the new name.
 
Method Summary
 void emitClass(TreeLogger logger, GwtLocale locale)
          Emits the new class.
static JMethod[] getAllInterfaceMethods(JClassType type)
          Returns all interface methods associated with the given type.
 JClassType getTarget()
           
 UnableToCompleteException logMissingResource(TreeLogger logger, java.lang.String during, AbstractResource.MissingResourceException e)
           
 void register(JType returnType, AbstractMethodCreator creator)
          Registers a method creator.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractGeneratorClassCreator

public AbstractGeneratorClassCreator(SourceWriter writer,
                                     JClassType targetClass)
Creates a new class creator, supplies a place to write the class, the interface to conform to, and the new name.

Parameters:
writer - writer
targetClass - class name
Method Detail

getAllInterfaceMethods

public static JMethod[] getAllInterfaceMethods(JClassType type)
Returns all interface methods associated with the given type.

Parameters:
type - associated type
Returns:
interface methods.

emitClass

public void emitClass(TreeLogger logger,
                      GwtLocale locale)
               throws UnableToCompleteException
Emits the new class.

Parameters:
logger -
locale -
Throws:
UnableToCompleteException

getTarget

public JClassType getTarget()

logMissingResource

public UnableToCompleteException logMissingResource(TreeLogger logger,
                                                    java.lang.String during,
                                                    AbstractResource.MissingResourceException e)

register

public void register(JType returnType,
                     AbstractMethodCreator creator)
Registers a method creator.

Parameters:
returnType - return type that this creator handles.
creator - creator to register