public abstract class BaseTestGenerator extends Object implements ITestGenerator
ITestGenerator
. Although this is not mandatory, it
is advised to extend this class rather than implementing the interface. Sub-classes
must implement ITestGenerator.process(IRecorderPacket)
, and may redefine all other
protected and public methods.Constructor and Description |
---|
BaseTestGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
complete(IProgressMonitor monitor)
This implementation does nothing.
|
void |
dispose()
This implementation does nothing.
|
int |
getCompleteOperationWeight()
This implementation returns 0.
|
protected ITestGeneratorContext |
getContext() |
void |
initialize(ITestGeneratorContext context)
This implementation stores the context so it can be retrieved later
using
BaseTestGenerator.getContext() . |
void |
inspect(IRecorderPacket packet)
This implementation does nothing.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
process
public void initialize(ITestGeneratorContext context) throws CoreException
BaseTestGenerator.getContext()
. Sub-classes may extend this method but should
not forget to invoke the super implementation.initialize
in interface ITestGenerator
context
- The context in which the test generator will operate.CoreException
public void inspect(IRecorderPacket packet) throws CoreException
inspect
in interface ITestGenerator
packet
- A recorder packet whose type has been declared to be supported by this test generator.CoreException
public void complete(IProgressMonitor monitor) throws CoreException
BaseTestGenerator.getCompleteOperationWeight()
.complete
in interface ITestGenerator
monitor
- A progress monitor. This progress monitor can be safely ignored if
ITestGenerator.getCompleteOperationWeight()
returns 0. Otherwise, the implementation
is expected to update this monitor to reflect the operation progress.CoreException
public void dispose()
dispose
in interface ITestGenerator
protected final ITestGeneratorContext getContext()
public int getCompleteOperationWeight()
getCompleteOperationWeight
in interface ITestGenerator
© Copyright IBM Corp. 2013. All rights reserved.