@Target(value={METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(value=RUNTIME) @Repeatable(value=PastOrPresent.List.class) @Documented @Constraint(validatedBy={}) public @interface PastOrPresent
現在はValidator
もしくはValidatorFactory
に付属するClockProvider
により定義されます。
デフォルトのclockProvider
は仮想マシンに応じて現在の時刻を定義し、必要に応じて現在のデフォルトのタイムゾーンを適用します。
ここでの現在の概念は制約が使用される型と相対的に定義されます。 たとえばYear
に対しての制約である場合、今年全体が意味されます。
サポートされる型は
java.util.Date
java.util.Calendar
java.time.Instant
java.time.LocalDate
java.time.LocalDateTime
java.time.LocalTime
java.time.MonthDay
java.time.OffsetDateTime
java.time.OffsetTime
java.time.Year
java.time.YearMonth
java.time.ZonedDateTime
java.time.chrono.HijrahDate
java.time.chrono.JapaneseDate
java.time.chrono.MinguoDate
java.time.chrono.ThaiBuddhistDate
null
要素は有効とみなされます。
Copyright © 2007-2018 Red Hat Inc. All Rights Reserved. Released under the Apache Software License 2.0. Translated by @megascus.