Interface RandomDataProviderStrategy

    • Method Detail

      • addOrReplaceFactory

        <T> AbstractRandomDataProviderStrategy addOrReplaceFactory​(Class<T> abstractClass,
                                                                   Class<?> factoryClass)
        Binds an interface/abstract class to its factory. If the strategy previously contained a binding for the interface/abstract class, the old value is replaced by the new value. If you want to implement more sophisticated binding strategy, override this class.
        Type Parameters:
        T - return type
        Parameters:
        abstractClass - the interface/abstract class to bind
        factoryClass - factory class for instantiation of abstractClass.
        Returns:
        itself
      • removeFactory

        <T> AbstractRandomDataProviderStrategy removeFactory​(Class<T> abstractClass)
        Remove binding of an interface/abstract class to its factory
        Type Parameters:
        T - return type
        Parameters:
        abstractClass - the interface/abstract class to remove binding
        Returns:
        itself
      • addOrReplaceAttributeStrategy

        RandomDataProviderStrategy addOrReplaceAttributeStrategy​(Class<? extends Annotation> annotationClass,
                                                                 AttributeStrategy<?> attributeStrategy)
        Bind an annotation to attribute strategy class. If the strategy previously contained a binding for the annotation, the old will be replaced. If you want to implement more sophisticated binding strategy, override this class.
        Parameters:
        annotationClass - the annotation class
        attributeStrategy - the attribute strategy
        Returns:
        itself
      • removeAttributeStrategy

        RandomDataProviderStrategy removeAttributeStrategy​(Class<? extends Annotation> annotationClass)
        Remove binding of an annotation to attribute strategy
        Parameters:
        annotationClass - the annotation class to remove binding
        Returns:
        itself
      • getConstructorLightComparator

        AbstractConstructorComparator getConstructorLightComparator()
        Getter for constructor light comparator.
        Returns:
        current constructor comparator used by strategy
      • getConstructorHeavyComparator

        AbstractConstructorComparator getConstructorHeavyComparator()
        Getter for constructor heavy comparator.
        Returns:
        current constructor comparator used by strategy
      • getMethodLightComparator

        AbstractMethodComparator getMethodLightComparator()
        Getter for method light comparator.
        Returns:
        current method comparator used by strategy
      • setMethodLightComparator

        void setMethodLightComparator​(AbstractMethodComparator methodLightComparator)
        Setter for method light comparator.

        Default implementations is MethodHeavyFirstComparator.

        Parameters:
        methodLightComparator - method comparator to set
      • getMethodHeavyComparator

        AbstractMethodComparator getMethodHeavyComparator()
        Getter for method heavy comparator.
        Returns:
        current method comparator used by strategy
      • setMethodHeavyComparator

        void setMethodHeavyComparator​(AbstractMethodComparator methodHeavyComparator)
        Setter for method heavy comparator.

        Default implementations is MethodHeavyFirstComparator.

        Parameters:
        methodHeavyComparator - method comparator to set