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

tech.simter.annotation.Format Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package tech.simter.annotation;

import java.lang.annotation.*;
import java.time.format.DateTimeFormatter;

/**
 * Can be used on {@link java.util.Date}, {@link java.util.Calendar} and java8DateTime to
 * indicate the pattern or lang to use when working with this date or time field.
 * The pattern format are the standard ones from {@link DateTimeFormatter}.
 *
 * @author RJ
 */
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface Format {
  /**
   * The pattern to use.
   *
   * @return the pattern
   */
  String value() default "";

  /**
   * The lang.
   *
   * @return the lang
   */
  String lang() default "";
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy