{"action":"created","comment":{"url":"https://api.github.com/repos/ryotan/code-enum-support/pulls/comments/68111052","id":68111052,"diff_hunk":"@@ -0,0 +1,90 @@\n+/*\n+ * These codes are licensed under CC0.\n+ *\n+ * http://creativecommons.org/publicdomain/zero/1.0/deed\n+ * http://creativecommons.org/publicdomain/zero/1.0/deed.ja\n+ */\n+\n+package io.github.ryotan.code.constraint;\n+\n+import static java.lang.annotation.ElementType.FIELD;\n+import static java.lang.annotation.ElementType.METHOD;\n+import static java.lang.annotation.ElementType.PARAMETER;\n+import static java.lang.annotation.RetentionPolicy.RUNTIME;\n+\n+import java.lang.annotation.Documented;\n+import java.lang.annotation.Retention;\n+import java.lang.annotation.Target;\n+import java.util.ArrayList;\n+import java.util.List;\n+import java.util.function.Predicate;\n+import javax.validation.Constraint;\n+import javax.validation.ConstraintValidator;\n+import javax.validation.ConstraintValidatorContext;\n+\n+import io.github.ryotan.code.Code;\n+import io.github.ryotan.code.CodeEnum;\n+import io.github.ryotan.code.util.CodeEnumReflectionUtil;\n+\n+@Target({METHOD, FIELD, PARAMETER})\n+@Retention(RUNTIME)\n+@Documented\n+@Constraint(validatedBy = {CodeValue.CodeValueValidator.class, CodeValue.CodeEnumValidator.class})\n+public @interface CodeValue {\n+\n+    String message() default \"{pw.itr0.poc.code.constraint.CodeValue.message}\";\n+\n+    Class<?>[] groups() default {};\n+\n+    Class<?>[] payload() default {};\n+\n+    Class<? extends CodeEnum<?>> value();\n+\n+    String[] filters() default {};\n+\n+    abstract class CodeEnumValidatorSupport<T> implements ConstraintValidator<CodeValue, T> {\n+        private Class<? extends CodeEnum> code;\n+        private List<Predicate<?>> filters = new ArrayList<>();","path":"src/main/java/io/github/ryotan/code/constraint/CodeValue.java","position":47,"original_position":47,"commit_id":"72ed4ad1912b1d41d8030fa58a3f3505332996a1","original_commit_id":"72ed4ad1912b1d41d8030fa58a3f3505332996a1","user":{"login":"ryotan","id":17810,"avatar_url":"https://avatars.githubusercontent.com/u/17810?v=3","gravatar_id":"","url":"https://api.github.com/users/ryotan","html_url":"https://github.com/ryotan","followers_url":"https://api.github.com/users/ryotan/followers","following_url":"https://api.github.com/users/ryotan/following{/other_user}","gists_url":"https://api.github.com/users/ryotan/gists{/gist_id}","starred_url":"https://api.github.com/users/ryotan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryotan/subscriptions","organizations_url":"https://api.github.com/users/ryotan/orgs","repos_url":"https://api.github.com/users/ryotan/repos","events_url":"https://api.github.com/users/ryotan/events{/privacy}","received_events_url":"https://api.github.com/users/ryotan/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Missing a Javadoc comment.](https://www.codacy.com/app/ryotan/code-enum-support/file/2819604748/issues/source?bid=3375378&fileBranchId=3375797#l47)","created_at":"2016-06-22T18:42:05Z","updated_at":"2016-06-22T18:42:05Z","html_url":"https://github.com/ryotan/code-enum-support/pull/1#discussion_r68111052","pull_request_url":"https://api.github.com/repos/ryotan/code-enum-support/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/ryotan/code-enum-support/pulls/comments/68111052"},"html":{"href":"https://github.com/ryotan/code-enum-support/pull/1#discussion_r68111052"},"pull_request":{"href":"https://api.github.com/repos/ryotan/code-enum-support/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/ryotan/code-enum-support/pulls/1","id":74822954,"html_url":"https://github.com/ryotan/code-enum-support/pull/1","diff_url":"https://github.com/ryotan/code-enum-support/pull/1.diff","patch_url":"https://github.com/ryotan/code-enum-support/pull/1.patch","issue_url":"https://api.github.com/repos/ryotan/code-enum-support/issues/1","number":1,"state":"open","locked":false,"title":"Add basic functionality.","user":{"login":"ryotan","id":17810,"avatar_url":"https://avatars.githubusercontent.com/u/17810?v=3","gravatar_id":"","url":"https://api.github.com/users/ryotan","html_url":"https://github.com/ryotan","followers_url":"https://api.github.com/users/ryotan/followers","following_url":"https://api.github.com/users/ryotan/following{/other_user}","gists_url":"https://api.github.com/users/ryotan/gists{/gist_id}","starred_url":"https://api.github.com/users/ryotan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryotan/subscriptions","organizations_url":"https://api.github.com/users/ryotan/orgs","repos_url":"https://api.github.com/users/ryotan/repos","events_url":"https://api.github.com/users/ryotan/events{/privacy}","received_events_url":"https://api.github.com/users/ryotan/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-22T17:17:28Z","updated_at":"2016-06-22T18:42:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"25a39d69f879cd7a1f2bdbe31cc641785078e1de","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ryotan/code-enum-support/pulls/1/commits","review_comments_url":"https://api.github.com/repos/ryotan/code-enum-support/pulls/1/comments","review_comment_url":"https://api.github.com/repos/ryotan/code-enum-support/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ryotan/code-enum-support/issues/1/comments","statuses_url":"https://api.github.com/repos/ryotan/code-enum-support/statuses/72ed4ad1912b1d41d8030fa58a3f3505332996a1","head":{"label":"ryotan:feature/basic-functionality","ref":"feature/basic-functionality","sha":"72ed4ad1912b1d41d8030fa58a3f3505332996a1","user":{"login":"ryotan","id":17810,"avatar_url":"https://avatars.githubusercontent.com/u/17810?v=3","gravatar_id":"","url":"https://api.github.com/users/ryotan","html_url":"https://github.com/ryotan","followers_url":"https://api.github.com/users/ryotan/followers","following_url":"https://api.github.com/users/ryotan/following{/other_user}","gists_url":"https://api.github.com/users/ryotan/gists{/gist_id}","starred_url":"https://api.github.com/users/ryotan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryotan/subscriptions","organizations_url":"https://api.github.com/users/ryotan/orgs","repos_url":"https://api.github.com/users/ryotan/repos","events_url":"https://api.github.com/users/ryotan/events{/privacy}","received_events_url":"https://api.github.com/users/ryotan/received_events","type":"User","site_admin":false},"repo":{"id":61708131,"name":"code-enum-support","full_name":"ryotan/code-enum-support","owner":{"login":"ryotan","id":17810,"avatar_url":"https://avatars.githubusercontent.com/u/17810?v=3","gravatar_id":"","url":"https://api.github.com/users/ryotan","html_url":"https://github.com/ryotan","followers_url":"https://api.github.com/users/ryotan/followers","following_url":"https://api.github.com/users/ryotan/following{/other_user}","gists_url":"https://api.github.com/users/ryotan/gists{/gist_id}","starred_url":"https://api.github.com/users/ryotan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryotan/subscriptions","organizations_url":"https://api.github.com/users/ryotan/orgs","repos_url":"https://api.github.com/users/ryotan/repos","events_url":"https://api.github.com/users/ryotan/events{/privacy}","received_events_url":"https://api.github.com/users/ryotan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ryotan/code-enum-support","description":null,"fork":false,"url":"https://api.github.com/repos/ryotan/code-enum-support","forks_url":"https://api.github.com/repos/ryotan/code-enum-support/forks","keys_url":"https://api.github.com/repos/ryotan/code-enum-support/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ryotan/code-enum-support/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ryotan/code-enum-support/teams","hooks_url":"https://api.github.com/repos/ryotan/code-enum-support/hooks","issue_events_url":"https://api.github.com/repos/ryotan/code-enum-support/issues/events{/number}","events_url":"https://api.github.com/repos/ryotan/code-enum-support/events","assignees_url":"https://api.github.com/repos/ryotan/code-enum-support/assignees{/user}","branches_url":"https://api.github.com/repos/ryotan/code-enum-support/branches{/branch}","tags_url":"https://api.github.com/repos/ryotan/code-enum-support/tags","blobs_url":"https://api.github.com/repos/ryotan/code-enum-support/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ryotan/code-enum-support/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ryotan/code-enum-support/git/refs{/sha}","trees_url":"https://api.github.com/repos/ryotan/code-enum-support/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ryotan/code-enum-support/statuses/{sha}","languages_url":"https://api.github.com/repos/ryotan/code-enum-support/languages","stargazers_url":"https://api.github.com/repos/ryotan/code-enum-support/stargazers","contributors_url":"https://api.github.com/repos/ryotan/code-enum-support/contributors","subscribers_url":"https://api.github.com/repos/ryotan/code-enum-support/subscribers","subscription_url":"https://api.github.com/repos/ryotan/code-enum-support/subscription","commits_url":"https://api.github.com/repos/ryotan/code-enum-support/commits{/sha}","git_commits_url":"https://api.github.com/repos/ryotan/code-enum-support/git/commits{/sha}","comments_url":"https://api.github.com/repos/ryotan/code-enum-support/comments{/number}","issue_comment_url":"https://api.github.com/repos/ryotan/code-enum-support/issues/comments{/number}","contents_url":"https://api.github.com/repos/ryotan/code-enum-support/contents/{+path}","compare_url":"https://api.github.com/repos/ryotan/code-enum-support/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ryotan/code-enum-support/merges","archive_url":"https://api.github.com/repos/ryotan/code-enum-support/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ryotan/code-enum-support/downloads","issues_url":"https://api.github.com/repos/ryotan/code-enum-support/issues{/number}","pulls_url":"https://api.github.com/repos/ryotan/code-enum-support/pulls{/number}","milestones_url":"https://api.github.com/repos/ryotan/code-enum-support/milestones{/number}","notifications_url":"https://api.github.com/repos/ryotan/code-enum-support/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ryotan/code-enum-support/labels{/name}","releases_url":"https://api.github.com/repos/ryotan/code-enum-support/releases{/id}","deployments_url":"https://api.github.com/repos/ryotan/code-enum-support/deployments","created_at":"2016-06-22T09:51:48Z","updated_at":"2016-06-22T14:22:02Z","pushed_at":"2016-06-22T18:40:12Z","git_url":"git://github.com/ryotan/code-enum-support.git","ssh_url":"git@github.com:ryotan/code-enum-support.git","clone_url":"https://github.com/ryotan/code-enum-support.git","svn_url":"https://github.com/ryotan/code-enum-support","homepage":null,"size":26,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"ryotan:develop","ref":"develop","sha":"e23c5831af8d21f5a8528206b7044e867f359f66","user":{"login":"ryotan","id":17810,"avatar_url":"https://avatars.githubusercontent.com/u/17810?v=3","gravatar_id":"","url":"https://api.github.com/users/ryotan","html_url":"https://github.com/ryotan","followers_url":"https://api.github.com/users/ryotan/followers","following_url":"https://api.github.com/users/ryotan/following{/other_user}","gists_url":"https://api.github.com/users/ryotan/gists{/gist_id}","starred_url":"https://api.github.com/users/ryotan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryotan/subscriptions","organizations_url":"https://api.github.com/users/ryotan/orgs","repos_url":"https://api.github.com/users/ryotan/repos","events_url":"https://api.github.com/users/ryotan/events{/privacy}","received_events_url":"https://api.github.com/users/ryotan/received_events","type":"User","site_admin":false},"repo":{"id":61708131,"name":"code-enum-support","full_name":"ryotan/code-enum-support","owner":{"login":"ryotan","id":17810,"avatar_url":"https://avatars.githubusercontent.com/u/17810?v=3","gravatar_id":"","url":"https://api.github.com/users/ryotan","html_url":"https://github.com/ryotan","followers_url":"https://api.github.com/users/ryotan/followers","following_url":"https://api.github.com/users/ryotan/following{/other_user}","gists_url":"https://api.github.com/users/ryotan/gists{/gist_id}","starred_url":"https://api.github.com/users/ryotan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryotan/subscriptions","organizations_url":"https://api.github.com/users/ryotan/orgs","repos_url":"https://api.github.com/users/ryotan/repos","events_url":"https://api.github.com/users/ryotan/events{/privacy}","received_events_url":"https://api.github.com/users/ryotan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ryotan/code-enum-support","description":null,"fork":false,"url":"https://api.github.com/repos/ryotan/code-enum-support","forks_url":"https://api.github.com/repos/ryotan/code-enum-support/forks","keys_url":"https://api.github.com/repos/ryotan/code-enum-support/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ryotan/code-enum-support/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ryotan/code-enum-support/teams","hooks_url":"https://api.github.com/repos/ryotan/code-enum-support/hooks","issue_events_url":"https://api.github.com/repos/ryotan/code-enum-support/issues/events{/number}","events_url":"https://api.github.com/repos/ryotan/code-enum-support/events","assignees_url":"https://api.github.com/repos/ryotan/code-enum-support/assignees{/user}","branches_url":"https://api.github.com/repos/ryotan/code-enum-support/branches{/branch}","tags_url":"https://api.github.com/repos/ryotan/code-enum-support/tags","blobs_url":"https://api.github.com/repos/ryotan/code-enum-support/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ryotan/code-enum-support/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ryotan/code-enum-support/git/refs{/sha}","trees_url":"https://api.github.com/repos/ryotan/code-enum-support/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ryotan/code-enum-support/statuses/{sha}","languages_url":"https://api.github.com/repos/ryotan/code-enum-support/languages","stargazers_url":"https://api.github.com/repos/ryotan/code-enum-support/stargazers","contributors_url":"https://api.github.com/repos/ryotan/code-enum-support/contributors","subscribers_url":"https://api.github.com/repos/ryotan/code-enum-support/subscribers","subscription_url":"https://api.github.com/repos/ryotan/code-enum-support/subscription","commits_url":"https://api.github.com/repos/ryotan/code-enum-support/commits{/sha}","git_commits_url":"https://api.github.com/repos/ryotan/code-enum-support/git/commits{/sha}","comments_url":"https://api.github.com/repos/ryotan/code-enum-support/comments{/number}","issue_comment_url":"https://api.github.com/repos/ryotan/code-enum-support/issues/comments{/number}","contents_url":"https://api.github.com/repos/ryotan/code-enum-support/contents/{+path}","compare_url":"https://api.github.com/repos/ryotan/code-enum-support/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ryotan/code-enum-support/merges","archive_url":"https://api.github.com/repos/ryotan/code-enum-support/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ryotan/code-enum-support/downloads","issues_url":"https://api.github.com/repos/ryotan/code-enum-support/issues{/number}","pulls_url":"https://api.github.com/repos/ryotan/code-enum-support/pulls{/number}","milestones_url":"https://api.github.com/repos/ryotan/code-enum-support/milestones{/number}","notifications_url":"https://api.github.com/repos/ryotan/code-enum-support/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ryotan/code-enum-support/labels{/name}","releases_url":"https://api.github.com/repos/ryotan/code-enum-support/releases{/id}","deployments_url":"https://api.github.com/repos/ryotan/code-enum-support/deployments","created_at":"2016-06-22T09:51:48Z","updated_at":"2016-06-22T14:22:02Z","pushed_at":"2016-06-22T18:40:12Z","git_url":"git://github.com/ryotan/code-enum-support.git","ssh_url":"git@github.com:ryotan/code-enum-support.git","clone_url":"https://github.com/ryotan/code-enum-support.git","svn_url":"https://github.com/ryotan/code-enum-support","homepage":null,"size":26,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ryotan/code-enum-support/pulls/1"},"html":{"href":"https://github.com/ryotan/code-enum-support/pull/1"},"issue":{"href":"https://api.github.com/repos/ryotan/code-enum-support/issues/1"},"comments":{"href":"https://api.github.com/repos/ryotan/code-enum-support/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/ryotan/code-enum-support/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/ryotan/code-enum-support/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ryotan/code-enum-support/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/ryotan/code-enum-support/statuses/72ed4ad1912b1d41d8030fa58a3f3505332996a1"}}}}
{"actor":{"display_login":"ryotan"}}