org.databene.benerator.wrapper
Class AccessingGenerator<S,P>
java.lang.Object
org.databene.benerator.util.AbstractGenerator<E>
org.databene.benerator.util.UnsafeGenerator<P>
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 UnsafeGenerator<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
Constructor Summary |
AccessingGenerator(java.lang.Class<P> targetType,
org.databene.commons.Accessor<S,P> accessor,
S provider)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AccessingGenerator
public AccessingGenerator(java.lang.Class<P> targetType,
org.databene.commons.Accessor<S,P> accessor,
S provider)
generate
public ProductWrapper<P> generate(ProductWrapper<P> wrapper)
- Description copied from interface:
Generator
- Returns an instance of the generic type E, using the
ProductWrapper
instance provided as argument.
The wrapper may wrap a null value as a regular generator product.
If the generator is not available (any more), it returns null instead of
the ProductWrapper instance.
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 © 2013. All Rights Reserved.