com.google.gwt.junit
Class CompileStrategy

java.lang.Object
  extended by com.google.gwt.junit.CompileStrategy

public abstract class CompileStrategy
extends java.lang.Object

An interface that specifies how modules should be compiled.


Constructor Summary
CompileStrategy(JUnitShell junitShell)
          Construct a CompileStrategy.
 
Method Summary
 void maybeAddTestBlockForCurrentTest(GWTTestCase testCase, BatchingStrategy batchingStrategy)
          Maybe add a test block for the currently executed test case.
 void maybeCompileAhead()
          Let the compile strategy compile another module.
abstract  ModuleDef maybeCompileModule(java.lang.String moduleName, java.lang.String syntheticModuleName, JUnitShell.Strategy strategy, BatchingStrategy batchingStrategy, TreeLogger treeLogger)
          Compile a single module using a synthetic module that adds JUnit support.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompileStrategy

public CompileStrategy(JUnitShell junitShell)
Construct a CompileStrategy.

Parameters:
junitShell -
Method Detail

maybeAddTestBlockForCurrentTest

public void maybeAddTestBlockForCurrentTest(GWTTestCase testCase,
                                            BatchingStrategy batchingStrategy)
Maybe add a test block for the currently executed test case.

Parameters:
testCase - the test case being run
batchingStrategy - the batching strategy

maybeCompileAhead

public void maybeCompileAhead()
                       throws UnableToCompleteException
Let the compile strategy compile another module. This is called while JUnitShell is waiting for the current test to complete.

Throws:
UnableToCompleteException - if the compilation fails

maybeCompileModule

public abstract ModuleDef maybeCompileModule(java.lang.String moduleName,
                                             java.lang.String syntheticModuleName,
                                             JUnitShell.Strategy strategy,
                                             BatchingStrategy batchingStrategy,
                                             TreeLogger treeLogger)
                                      throws UnableToCompleteException
Compile a single module using a synthetic module that adds JUnit support.

Parameters:
moduleName - the module name
syntheticModuleName - the synthetic module name
strategy - the strategy
batchingStrategy - the batching strategy
treeLogger - the logger
Returns:
the ModuleDef describing the synthetic module
Throws:
UnableToCompleteException