Skip to content

Instantly share code, notes, and snippets.

/.java Secret

Created July 9, 2015 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/375cb8eeb31a8979d6ea to your computer and use it in GitHub Desktop.
Save anonymous/375cb8eeb31a8979d6ea to your computer and use it in GitHub Desktop.
@Constraint(validatedBy = ...)
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER}
@Retention(RUNTIME)
@Repeatable(MyCustomConstraint.List.class)
public @interface MyCustomConstraint {
String myCustomValue();
public @interface List {
MyCustomConstraint[] value();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment