Annotation Type Contract


  • @Documented
    @Target(TYPE)
    @Retention(CLASS)
    public @interface Contract
    Defines behavioral contract enforced at runtime by instances of annotated classes.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      ThreadingBehavior threading
      Gets the threading behavior for annotated type.
    • Element Detail

      • threading

        ThreadingBehavior threading
        Gets the threading behavior for annotated type.

        The default value is ThreadingBehavior.UNSAFE.

        Returns:
        the threading behavior for annotated type.
        Default:
        org.apache.hc.core5.annotation.ThreadingBehavior.UNSAFE