Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package kuneo.org.sample.typeuse;
import static java.lang.annotation.ElementType.TYPE_USE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.OverridesAttribute;
import javax.validation.Payload;
import javax.validation.constraints.Digits;
@Target({ TYPE_USE })
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy = {})
@Digits(integer = 0, fraction = 0)
public @interface DigitsTypeUse {
@OverridesAttribute(constraint = Digits.class, name = "integer")
int integer();
@OverridesAttribute(constraint = Digits.class, name = "fraction")
int fraction();
String message() default "{javax.validation.constraints.Digits.message}";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment