GitHub PullRequestReviewCommentEvent at 2014-08-19 23:26:40
Repository: auto
Actor: eamonnmcmanus
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/google/auto/pulls/comments/16450922","id":16450922,"diff_hunk":"@@ -177,11 +182,53 @@ private static String classNameOf(TypeElement type) {\n   public static class Property {\n     private final ExecutableElement method;\n     private final String type;\n+    private final ImmutableList<String> annotationClasses;\n \n     Property(ExecutableElement method, String type) {\n       this.method = method;\n       this.type = type;\n-    }\n+\n+      annotationClasses = FluentIterable\n+          .from(method.getAnnotationMirrors())\n+          .filter(Predicates.notNull())\n+          .transform(mirrorToString)\n+          .toList();\n+    }\n+\n+    private static final Function<AnnotationMirror, String> mirrorToString = new Function<AnnotationMirror, String>() {\n+      @Nullable\n+      @Override\n+      public String apply(AnnotationMirror annotationMirror) {\n+        Element element = annotationMirror.getAnnotationType().asElement();\n+        Symbol.ClassSymbol symbol = (Symbol.ClassSymbol) element;\n+        String rv = \"@\" + symbol.fullname.toString();","path":"value/src/main/java/com/google/auto/value/processor/AutoValueProcessor.java","position":55,"original_position":55,"commit_id":"0e497cdd3d25048307935afe9578a33a7a7df603","original_commit_id":"0e497cdd3d25048307935afe9578a33a7a7df603","user":{"login":"eamonnmcmanus","id":5246810,"avatar_url":"https://avatars.githubusercontent.com/u/5246810?v=2","gravatar_id":"c641058ceb1ed0bc4eef74be95d85cdd","url":"https://api.github.com/users/eamonnmcmanus","html_url":"https://github.com/eamonnmcmanus","followers_url":"https://api.github.com/users/eamonnmcmanus/followers","following_url":"https://api.github.com/users/eamonnmcmanus/following{/other_user}","gists_url":"https://api.github.com/users/eamonnmcmanus/gists{/gist_id}","starred_url":"https://api.github.com/users/eamonnmcmanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eamonnmcmanus/subscriptions","organizations_url":"https://api.github.com/users/eamonnmcmanus/orgs","repos_url":"https://api.github.com/users/eamonnmcmanus/repos","events_url":"https://api.github.com/users/eamonnmcmanus/events{/privacy}","received_events_url":"https://api.github.com/users/eamonnmcmanus/received_events","type":"User","site_admin":false},"body":"I think we would need to feed the list of referenced annotations to TypeSimplifier and get it to return the canonical name of each one.","created_at":"2014-08-19T23:26:40Z","updated_at":"2014-08-19T23:26:40Z","html_url":"https://github.com/google/auto/pull/127#discussion_r16450922","pull_request_url":"https://api.github.com/repos/google/auto/pulls/127","_links":{"self":{"href":"https://api.github.com/repos/google/auto/pulls/comments/16450922"},"html":{"href":"https://github.com/google/auto/pull/127#discussion_r16450922"},"pull_request":{"href":"https://api.github.com/repos/google/auto/pulls/127"}}},"pull_request":{"url":"https://api.github.com/repos/google/auto/pulls/127","id":19884763,"html_url":"https://github.com/google/auto/pull/127","diff_url":"https://github.com/google/auto/pull/127.diff","patch_url":"https://github.com/google/auto/pull/127.patch","issue_url":"https://api.github.com/repos/google/auto/issues/127","number":127,"state":"open","locked":false,"title":"Feature/keep annotations","user":{"login":"jmcampanini","id":316848,"avatar_url":"https://avatars.githubusercontent.com/u/316848?v=2","gravatar_id":"95756a78f6c39d7bc4124f34f844b0ae","url":"https://api.github.com/users/jmcampanini","html_url":"https://github.com/jmcampanini","followers_url":"https://api.github.com/users/jmcampanini/followers","following_url":"https://api.github.com/users/jmcampanini/following{/other_user}","gists_url":"https://api.github.com/users/jmcampanini/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcampanini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcampanini/subscriptions","organizations_url":"https://api.github.com/users/jmcampanini/orgs","repos_url":"https://api.github.com/users/jmcampanini/repos","events_url":"https://api.github.com/users/jmcampanini/events{/privacy}","received_events_url":"https://api.github.com/users/jmcampanini/received_events","type":"User","site_admin":false},"body":"the goal was to have the generated classes keep annotations that were on the original abstract classes. this way you could use the generated code with Jackson easily, using annotations like `@JsonProperty(\"myProp\")` and having them just work.\r\n\r\ni added a new property to the `Property` class that lists the annotations, and using the velocity template to add them to the get methods.\r\n\r\nthis pull request contains the temporary fix for the breaking test, so i expect to rebase/fix it before actually getting merged in.","created_at":"2014-08-16T23:54:46Z","updated_at":"2014-08-19T23:26:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b502dcca636dc6bc3f312402f0c28f50d671a71","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/google/auto/pulls/127/commits","review_comments_url":"https://api.github.com/repos/google/auto/pulls/127/comments","review_comment_url":"https://api.github.com/repos/google/auto/pulls/comments/{number}","comments_url":"https://api.github.com/repos/google/auto/issues/127/comments","statuses_url":"https://api.github.com/repos/google/auto/statuses/0e497cdd3d25048307935afe9578a33a7a7df603","head":{"label":"jmcampanini:feature/keep-annotations","ref":"feature/keep-annotations","sha":"0e497cdd3d25048307935afe9578a33a7a7df603","user":{"login":"jmcampanini","id":316848,"avatar_url":"https://avatars.githubusercontent.com/u/316848?v=2","gravatar_id":"95756a78f6c39d7bc4124f34f844b0ae","url":"https://api.github.com/users/jmcampanini","html_url":"https://github.com/jmcampanini","followers_url":"https://api.github.com/users/jmcampanini/followers","following_url":"https://api.github.com/users/jmcampanini/following{/other_user}","gists_url":"https://api.github.com/users/jmcampanini/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcampanini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcampanini/subscriptions","organizations_url":"https://api.github.com/users/jmcampanini/orgs","repos_url":"https://api.github.com/users/jmcampanini/repos","events_url":"https://api.github.com/users/jmcampanini/events{/privacy}","received_events_url":"https://api.github.com/users/jmcampanini/received_events","type":"User","site_admin":false},"repo":{"id":23029419,"name":"auto","full_name":"jmcampanini/auto","owner":{"login":"jmcampanini","id":316848,"avatar_url":"https://avatars.githubusercontent.com/u/316848?v=2","gravatar_id":"95756a78f6c39d7bc4124f34f844b0ae","url":"https://api.github.com/users/jmcampanini","html_url":"https://github.com/jmcampanini","followers_url":"https://api.github.com/users/jmcampanini/followers","following_url":"https://api.github.com/users/jmcampanini/following{/other_user}","gists_url":"https://api.github.com/users/jmcampanini/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcampanini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcampanini/subscriptions","organizations_url":"https://api.github.com/users/jmcampanini/orgs","repos_url":"https://api.github.com/users/jmcampanini/repos","events_url":"https://api.github.com/users/jmcampanini/events{/privacy}","received_events_url":"https://api.github.com/users/jmcampanini/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmcampanini/auto","description":"A collection of source code generators for Java.","fork":true,"url":"https://api.github.com/repos/jmcampanini/auto","forks_url":"https://api.github.com/repos/jmcampanini/auto/forks","keys_url":"https://api.github.com/repos/jmcampanini/auto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmcampanini/auto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmcampanini/auto/teams","hooks_url":"https://api.github.com/repos/jmcampanini/auto/hooks","issue_events_url":"https://api.github.com/repos/jmcampanini/auto/issues/events{/number}","events_url":"https://api.github.com/repos/jmcampanini/auto/events","assignees_url":"https://api.github.com/repos/jmcampanini/auto/assignees{/user}","branches_url":"https://api.github.com/repos/jmcampanini/auto/branches{/branch}","tags_url":"https://api.github.com/repos/jmcampanini/auto/tags","blobs_url":"https://api.github.com/repos/jmcampanini/auto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmcampanini/auto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmcampanini/auto/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmcampanini/auto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmcampanini/auto/statuses/{sha}","languages_url":"https://api.github.com/repos/jmcampanini/auto/languages","stargazers_url":"https://api.github.com/repos/jmcampanini/auto/stargazers","contributors_url":"https://api.github.com/repos/jmcampanini/auto/contributors","subscribers_url":"https://api.github.com/repos/jmcampanini/auto/subscribers","subscription_url":"https://api.github.com/repos/jmcampanini/auto/subscription","commits_url":"https://api.github.com/repos/jmcampanini/auto/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmcampanini/auto/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmcampanini/auto/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmcampanini/auto/issues/comments/{number}","contents_url":"https://api.github.com/repos/jmcampanini/auto/contents/{+path}","compare_url":"https://api.github.com/repos/jmcampanini/auto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmcampanini/auto/merges","archive_url":"https://api.github.com/repos/jmcampanini/auto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmcampanini/auto/downloads","issues_url":"https://api.github.com/repos/jmcampanini/auto/issues{/number}","pulls_url":"https://api.github.com/repos/jmcampanini/auto/pulls{/number}","milestones_url":"https://api.github.com/repos/jmcampanini/auto/milestones{/number}","notifications_url":"https://api.github.com/repos/jmcampanini/auto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmcampanini/auto/labels{/name}","releases_url":"https://api.github.com/repos/jmcampanini/auto/releases{/id}","created_at":"2014-08-16T23:44:23Z","updated_at":"2014-08-15T10:38:32Z","pushed_at":"2014-08-16T23:48:27Z","git_url":"git://github.com/jmcampanini/auto.git","ssh_url":"git@github.com:jmcampanini/auto.git","clone_url":"https://github.com/jmcampanini/auto.git","svn_url":"https://github.com/jmcampanini/auto","homepage":"","size":2250,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"23a8e52c6fb6ef27c13b9576641baee0c9fea622","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=2","gravatar_id":"24ba30616d2a20673f54c2aee36d159e","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":10230369,"name":"auto","full_name":"google/auto","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=2","gravatar_id":"24ba30616d2a20673f54c2aee36d159e","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/auto","description":"A collection of source code generators for Java.","fork":false,"url":"https://api.github.com/repos/google/auto","forks_url":"https://api.github.com/repos/google/auto/forks","keys_url":"https://api.github.com/repos/google/auto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/auto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/auto/teams","hooks_url":"https://api.github.com/repos/google/auto/hooks","issue_events_url":"https://api.github.com/repos/google/auto/issues/events{/number}","events_url":"https://api.github.com/repos/google/auto/events","assignees_url":"https://api.github.com/repos/google/auto/assignees{/user}","branches_url":"https://api.github.com/repos/google/auto/branches{/branch}","tags_url":"https://api.github.com/repos/google/auto/tags","blobs_url":"https://api.github.com/repos/google/auto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/auto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/auto/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/auto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/auto/statuses/{sha}","languages_url":"https://api.github.com/repos/google/auto/languages","stargazers_url":"https://api.github.com/repos/google/auto/stargazers","contributors_url":"https://api.github.com/repos/google/auto/contributors","subscribers_url":"https://api.github.com/repos/google/auto/subscribers","subscription_url":"https://api.github.com/repos/google/auto/subscription","commits_url":"https://api.github.com/repos/google/auto/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/auto/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/auto/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/auto/issues/comments/{number}","contents_url":"https://api.github.com/repos/google/auto/contents/{+path}","compare_url":"https://api.github.com/repos/google/auto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/auto/merges","archive_url":"https://api.github.com/repos/google/auto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/auto/downloads","issues_url":"https://api.github.com/repos/google/auto/issues{/number}","pulls_url":"https://api.github.com/repos/google/auto/pulls{/number}","milestones_url":"https://api.github.com/repos/google/auto/milestones{/number}","notifications_url":"https://api.github.com/repos/google/auto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/auto/labels{/name}","releases_url":"https://api.github.com/repos/google/auto/releases{/id}","created_at":"2013-05-22T21:41:56Z","updated_at":"2014-08-19T05:45:23Z","pushed_at":"2014-08-13T18:22:06Z","git_url":"git://github.com/google/auto.git","ssh_url":"git@github.com:google/auto.git","clone_url":"https://github.com/google/auto.git","svn_url":"https://github.com/google/auto","homepage":"","size":2250,"stargazers_count":518,"watchers_count":518,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":87,"mirror_url":null,"open_issues_count":35,"forks":87,"open_issues":35,"watchers":518,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/auto/pulls/127"},"html":{"href":"https://github.com/google/auto/pull/127"},"issue":{"href":"https://api.github.com/repos/google/auto/issues/127"},"comments":{"href":"https://api.github.com/repos/google/auto/issues/127/comments"},"review_comments":{"href":"https://api.github.com/repos/google/auto/pulls/127/comments"},"review_comment":{"href":"https://api.github.com/repos/google/auto/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/google/auto/pulls/127/commits"},"statuses":{"href":"https://api.github.com/repos/google/auto/statuses/0e497cdd3d25048307935afe9578a33a7a7df603"}}}}