com.google.gwt.core.ext
Interface GeneratorContext


public interface GeneratorContext


Method Summary
 void commit(TreeLogger logger, PrintWriter pw)
          Commits source generation begun with tryCreate(TreeLogger, String, String).
 PropertyOracle getPropertyOracle()
          Gets the property oracle for the current generator context.
 TypeOracle getTypeOracle()
          Gets the type oracle for the current generator context.
 PrintWriter tryCreate(TreeLogger logger, String packageName, String simpleName)
          Attempts to get a PrintWriter so that the caller can generate the source code for the named type.
 

Method Detail

tryCreate

public PrintWriter tryCreate(TreeLogger logger,
                             String packageName,
                             String simpleName)
Attempts to get a PrintWriter so that the caller can generate the source code for the named type. If the named types already exists, null is returned to indicate that no work needs to be done.

Parameters:
logger - a logger; normally the logger passed into Generator.generate(TreeLogger, GeneratorContext, String) or a branch thereof
packageName - the name of the package to which the create type belongs
simpleName - the unqualified source name of the type being generated
Returns:
null if the package and class already exists, otherwise a PrintWriter is returned.

commit

public void commit(TreeLogger logger,
                   PrintWriter pw)
Commits source generation begun with tryCreate(TreeLogger, String, String).


getTypeOracle

public TypeOracle getTypeOracle()
Gets the type oracle for the current generator context. Generators can use the type oracle to ask questions about the entire translatable code base.

Returns:
a TypeOracle over all the relevant translatable compilation units in the source path

getPropertyOracle

public PropertyOracle getPropertyOracle()
Gets the property oracle for the current generator context. Generators can use the property oracle to query deferred binding properties.



This javadoc distribution was not produced by Google. The official documentation is here.