Interface PropertyAttributes


  • @API(status=EXPERIMENTAL,
         since="1.3.4")
    public interface PropertyAttributes
    Represents a property method's attributes which are set (or not) in attributes of the Property annotation.

    This object can be used to query, set or change a property's attribute during the AroundPropertyHook lifecycle hook.

    • Method Detail

      • tries

        java.util.Optional<java.lang.Integer> tries()
        The number of tries to be run in the property at hand. Only present when set explicitly through Property.tries() or setTries(Integer).

        jqwik may override an explicit tries value if exhaustive or data-driven generation is chosen.

        Returns:
        optional number of tries
      • maxDiscardRatio

        java.util.Optional<java.lang.Integer> maxDiscardRatio()
        The maximum allowed discard ration in the property at hand. Only present when set explicitly through Property.maxDiscardRatio() or setMaxDiscardRatio(Integer).
        Returns:
        optional maximum discard ratio
      • stereotype

        java.util.Optional<java.lang.String> stereotype()
        The stereotype of the property at hand. Only present when set explicitly through Property.stereotype() or setStereotype(String).
        Returns:
        optional stereotype
      • seed

        java.util.Optional<java.lang.String> seed()
        The random seed used when running the property at hand. Only present when set explicitly through Property.seed() or setSeed(String).
        Returns:
        optional random seed
      • setTries

        void setTries​(java.lang.Integer tries)
      • setMaxDiscardRatio

        void setMaxDiscardRatio​(java.lang.Integer maxDiscardRatio)
      • setShrinking

        void setShrinking​(ShrinkingMode shrinkingMode)
      • setGeneration

        void setGeneration​(GenerationMode generationMode)
      • setEdgeCases

        void setEdgeCases​(EdgeCasesMode edgeCasesMode)
      • setStereotype

        void setStereotype​(java.lang.String stereotype)
      • setSeed

        void setSeed​(java.lang.String seed)