Class PropertyValueGenerator

java.lang.Object
nl._42.beanie.generator.PropertyValueGenerator
All Implemented Interfaces:
ValueGenerator
Direct Known Subclasses:
ReferencedTypeValueGenerator

public abstract class PropertyValueGenerator extends Object implements ValueGenerator
Value generator that is capable of providing the property.
Since:
Jun 8, 2016
Author:
Jeroen van Schagen
  • Constructor Details

    • PropertyValueGenerator

      public PropertyValueGenerator()
  • Method Details

    • generate

      public abstract Object generate(PropertyReference reference, Class<?> propertyType)
      Generate a new value of the specified property.
      Parameters:
      reference - the property reference
      propertyType - the type of property
      Returns:
      the generation property value
    • generate

      public final Object generate(Class<?> type)
      Generate a new value of the specified type.
      Specified by:
      generate in interface ValueGenerator
      Parameters:
      type - the type of value
      Returns:
      the generation value