org.databene.benerator.wrapper
Class AccessingGenerator<S,P>

java.lang.Object
  extended by org.databene.benerator.util.AbstractGenerator<E>
      extended by org.databene.benerator.util.SimpleGenerator<P>
          extended by org.databene.benerator.wrapper.AccessingGenerator<S,P>
All Implemented Interfaces:
java.io.Closeable, Generator<P>, org.databene.commons.Resettable, org.databene.commons.ThreadAware

public class AccessingGenerator<S,P>
extends SimpleGenerator<P>

Returns the results of an accessor that is applied on a constant provider object.

Created: 22.08.2007 19:05:40

Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.benerator.util.AbstractGenerator
context, state
 
Constructor Summary
AccessingGenerator(java.lang.Class<P> targetType, org.databene.commons.Accessor<S,P> accessor, S provider)
           
 
Method Summary
 P generate()
          Returns an instance of the generic type E.
 java.lang.Class<P> getGeneratedType()
          Declares the type of the objects returned by the generate() method.
 java.lang.String toString()
           
 
Methods inherited from class org.databene.benerator.util.SimpleGenerator
isParallelizable, isThreadSafe
 
Methods inherited from class org.databene.benerator.util.AbstractGenerator
assertInitialized, assertNotInitialized, close, init, reset, wasInitialized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AccessingGenerator

public AccessingGenerator(java.lang.Class<P> targetType,
                          org.databene.commons.Accessor<S,P> accessor,
                          S provider)
Method Detail

generate

public P generate()
Description copied from interface: Generator
Returns an instance of the generic type E.


getGeneratedType

public java.lang.Class<P> getGeneratedType()
Description copied from interface: Generator
Declares the type of the objects returned by the generate() method.


toString

public java.lang.String toString()
Overrides:
toString in class AbstractGenerator<P>


Copyright © 2011. All Rights Reserved.