All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tngtech.jgiven.annotation.NamedFormat Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
package com.tngtech.jgiven.annotation;

import java.lang.annotation.Annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.tngtech.jgiven.format.DefaultObjectFormatter;

/**
 *
 * Allow to specify an identifiable format
* * * @See also {@link NamedFormats} * @since 0.15.0 */ @Retention( RetentionPolicy.RUNTIME ) @Target( { ElementType.PARAMETER, ElementType.ANNOTATION_TYPE } ) public @interface NamedFormat { /** * Specify a name identifying this format */ String name(); /** * Specify an inline {@link Format} * *

* Mutually exclusive with {@link #formatAnnotation()} *

*/ Format format() default @Format( DefaultObjectFormatter.class ); /** * Specify a custom format annotation * *

*

    *
  • mutually exclusive with {@link #format()}
  • *
  • when set, has precedence over any specified {@link #format()}
  • *
*

* * @See JGiven User Guide - Custom formatting annotations */ Class formatAnnotation() default Annotation.class; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy