org.databene.benerator.composite
Class AbstractGeneratorComponent<E>

java.lang.Object
  extended by org.databene.benerator.engine.AbstractScopedLifeCycleHolder
      extended by org.databene.benerator.composite.AbstractGeneratorComponent<E>
All Implemented Interfaces:
java.io.Closeable, GeneratorComponent<E>, LifeCycleHolder, ScopedLifeCycleHolder, Statement, org.databene.commons.MessageHolder, org.databene.commons.Resettable, org.databene.commons.ThreadAware
Direct Known Subclasses:
AbstractComponentBuilder, Variable

public abstract class AbstractGeneratorComponent<E>
extends AbstractScopedLifeCycleHolder
implements GeneratorComponent<E>

Abstract implementation of the GeneratorComponent interface which manages a source Generator and a Context reference.

Created: 31.08.2011 12:56:22

Since:
0.7.0
Author:
Volker Bergmann

Field Summary
protected  GeneratorContext context
           
protected  java.lang.String message
           
protected  Generator<?> source
           
 
Constructor Summary
AbstractGeneratorComponent(Generator<?> source, java.lang.String scope)
           
 
Method Summary
protected  void assertInitialized()
           
 void close()
           
 java.lang.String getMessage()
           
 Generator<?> getSource()
           
 void init(BeneratorContext context)
           
 boolean isParallelizable()
           
 boolean isThreadSafe()
           
 void reset()
           
 java.lang.String toString()
           
 
Methods inherited from class org.databene.benerator.engine.AbstractScopedLifeCycleHolder
getScope, isResetNeeded, resetIfNeeded, setResetNeeded, setScope
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.databene.benerator.engine.Statement
execute
 
Methods inherited from interface org.databene.benerator.engine.ScopedLifeCycleHolder
getScope, isResetNeeded, resetIfNeeded, setResetNeeded, setScope
 

Field Detail

source

protected Generator<?> source

context

protected GeneratorContext context

message

protected java.lang.String message
Constructor Detail

AbstractGeneratorComponent

public AbstractGeneratorComponent(Generator<?> source,
                                  java.lang.String scope)
Method Detail

getSource

public Generator<?> getSource()

getMessage

public java.lang.String getMessage()
Specified by:
getMessage in interface org.databene.commons.MessageHolder

assertInitialized

protected void assertInitialized()

init

public void init(BeneratorContext context)
Specified by:
init in interface LifeCycleHolder

reset

public void reset()
Specified by:
reset in interface org.databene.commons.Resettable

close

public void close()
Specified by:
close in interface java.io.Closeable
Specified by:
close in interface GeneratorComponent<E>

isParallelizable

public boolean isParallelizable()
Specified by:
isParallelizable in interface org.databene.commons.ThreadAware

isThreadSafe

public boolean isThreadSafe()
Specified by:
isThreadSafe in interface org.databene.commons.ThreadAware

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2013. All Rights Reserved.