{"action":"created","comment":{"url":"https://api.github.com/repos/prestodb/tempto/pulls/comments/40889858","id":40889858,"diff_hunk":"@@ -0,0 +1,76 @@\n+/*\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package com.teradata.tempto.internal;\n+\n+import com.google.inject.Inject;\n+import com.google.inject.Injector;\n+import com.google.inject.Key;\n+import com.google.inject.TypeLiteral;\n+\n+import java.lang.annotation.Annotation;\n+import java.lang.reflect.Method;\n+import java.lang.reflect.Parameter;\n+import java.util.List;\n+import java.util.Optional;\n+import java.util.function.Predicate;\n+\n+import static java.util.Arrays.asList;\n+\n+public class ReflectionInjectorHelper","path":"tempto-core/src/main/java/com/teradata/tempto/internal/ReflectionInjectorHelper.java","position":31,"original_position":31,"commit_id":"f872c3b6b1dc9186e0fe7a6b25c99b7ba4aec72b","original_commit_id":"f872c3b6b1dc9186e0fe7a6b25c99b7ba4aec72b","user":{"login":"losipiuk","id":890111,"avatar_url":"https://avatars.githubusercontent.com/u/890111?v=3","gravatar_id":"","url":"https://api.github.com/users/losipiuk","html_url":"https://github.com/losipiuk","followers_url":"https://api.github.com/users/losipiuk/followers","following_url":"https://api.github.com/users/losipiuk/following{/other_user}","gists_url":"https://api.github.com/users/losipiuk/gists{/gist_id}","starred_url":"https://api.github.com/users/losipiuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/losipiuk/subscriptions","organizations_url":"https://api.github.com/users/losipiuk/orgs","repos_url":"https://api.github.com/users/losipiuk/repos","events_url":"https://api.github.com/users/losipiuk/events{/privacy}","received_events_url":"https://api.github.com/users/losipiuk/received_events","type":"User","site_admin":false},"body":"As we talked maybe better approach would be to create bytecode for class with field for each injectable method parameter and then run `injectMembers` on the class. This way you do not have to replicate Guice logic by hand.","created_at":"2015-10-01T08:32:36Z","updated_at":"2015-10-01T08:32:36Z","html_url":"https://github.com/prestodb/tempto/pull/57#discussion_r40889858","pull_request_url":"https://api.github.com/repos/prestodb/tempto/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/prestodb/tempto/pulls/comments/40889858"},"html":{"href":"https://github.com/prestodb/tempto/pull/57#discussion_r40889858"},"pull_request":{"href":"https://api.github.com/repos/prestodb/tempto/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/prestodb/tempto/pulls/57","id":46458980,"html_url":"https://github.com/prestodb/tempto/pull/57","diff_url":"https://github.com/prestodb/tempto/pull/57.diff","patch_url":"https://github.com/prestodb/tempto/pull/57.patch","issue_url":"https://api.github.com/repos/prestodb/tempto/issues/57","number":57,"state":"open","locked":false,"title":"core: add possibility to inject state into before and after methods","user":{"login":"kokosing","id":7569403,"avatar_url":"https://avatars.githubusercontent.com/u/7569403?v=3","gravatar_id":"","url":"https://api.github.com/users/kokosing","html_url":"https://github.com/kokosing","followers_url":"https://api.github.com/users/kokosing/followers","following_url":"https://api.github.com/users/kokosing/following{/other_user}","gists_url":"https://api.github.com/users/kokosing/gists{/gist_id}","starred_url":"https://api.github.com/users/kokosing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kokosing/subscriptions","organizations_url":"https://api.github.com/users/kokosing/orgs","repos_url":"https://api.github.com/users/kokosing/repos","events_url":"https://api.github.com/users/kokosing/events{/privacy}","received_events_url":"https://api.github.com/users/kokosing/received_events","type":"User","site_admin":false},"body":"core: add possibility to inject state into before and after methods\n\nTask: #45\n\nTest Plan: unit tests and running examples\n\nReviewers: losipiuk\n","created_at":"2015-09-30T21:26:57Z","updated_at":"2015-10-01T08:32:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/prestodb/tempto/pulls/57/commits","review_comments_url":"https://api.github.com/repos/prestodb/tempto/pulls/57/comments","review_comment_url":"https://api.github.com/repos/prestodb/tempto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prestodb/tempto/issues/57/comments","statuses_url":"https://api.github.com/repos/prestodb/tempto/statuses/f872c3b6b1dc9186e0fe7a6b25c99b7ba4aec72b","head":{"label":"kokosing:feature_injection","ref":"feature_injection","sha":"f872c3b6b1dc9186e0fe7a6b25c99b7ba4aec72b","user":{"login":"kokosing","id":7569403,"avatar_url":"https://avatars.githubusercontent.com/u/7569403?v=3","gravatar_id":"","url":"https://api.github.com/users/kokosing","html_url":"https://github.com/kokosing","followers_url":"https://api.github.com/users/kokosing/followers","following_url":"https://api.github.com/users/kokosing/following{/other_user}","gists_url":"https://api.github.com/users/kokosing/gists{/gist_id}","starred_url":"https://api.github.com/users/kokosing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kokosing/subscriptions","organizations_url":"https://api.github.com/users/kokosing/orgs","repos_url":"https://api.github.com/users/kokosing/repos","events_url":"https://api.github.com/users/kokosing/events{/privacy}","received_events_url":"https://api.github.com/users/kokosing/received_events","type":"User","site_admin":false},"repo":{"id":39194685,"name":"tempto","full_name":"kokosing/tempto","owner":{"login":"kokosing","id":7569403,"avatar_url":"https://avatars.githubusercontent.com/u/7569403?v=3","gravatar_id":"","url":"https://api.github.com/users/kokosing","html_url":"https://github.com/kokosing","followers_url":"https://api.github.com/users/kokosing/followers","following_url":"https://api.github.com/users/kokosing/following{/other_user}","gists_url":"https://api.github.com/users/kokosing/gists{/gist_id}","starred_url":"https://api.github.com/users/kokosing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kokosing/subscriptions","organizations_url":"https://api.github.com/users/kokosing/orgs","repos_url":"https://api.github.com/users/kokosing/repos","events_url":"https://api.github.com/users/kokosing/events{/privacy}","received_events_url":"https://api.github.com/users/kokosing/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kokosing/tempto","description":"A testing framework for Presto","fork":true,"url":"https://api.github.com/repos/kokosing/tempto","forks_url":"https://api.github.com/repos/kokosing/tempto/forks","keys_url":"https://api.github.com/repos/kokosing/tempto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kokosing/tempto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kokosing/tempto/teams","hooks_url":"https://api.github.com/repos/kokosing/tempto/hooks","issue_events_url":"https://api.github.com/repos/kokosing/tempto/issues/events{/number}","events_url":"https://api.github.com/repos/kokosing/tempto/events","assignees_url":"https://api.github.com/repos/kokosing/tempto/assignees{/user}","branches_url":"https://api.github.com/repos/kokosing/tempto/branches{/branch}","tags_url":"https://api.github.com/repos/kokosing/tempto/tags","blobs_url":"https://api.github.com/repos/kokosing/tempto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kokosing/tempto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kokosing/tempto/git/refs{/sha}","trees_url":"https://api.github.com/repos/kokosing/tempto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kokosing/tempto/statuses/{sha}","languages_url":"https://api.github.com/repos/kokosing/tempto/languages","stargazers_url":"https://api.github.com/repos/kokosing/tempto/stargazers","contributors_url":"https://api.github.com/repos/kokosing/tempto/contributors","subscribers_url":"https://api.github.com/repos/kokosing/tempto/subscribers","subscription_url":"https://api.github.com/repos/kokosing/tempto/subscription","commits_url":"https://api.github.com/repos/kokosing/tempto/commits{/sha}","git_commits_url":"https://api.github.com/repos/kokosing/tempto/git/commits{/sha}","comments_url":"https://api.github.com/repos/kokosing/tempto/comments{/number}","issue_comment_url":"https://api.github.com/repos/kokosing/tempto/issues/comments{/number}","contents_url":"https://api.github.com/repos/kokosing/tempto/contents/{+path}","compare_url":"https://api.github.com/repos/kokosing/tempto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kokosing/tempto/merges","archive_url":"https://api.github.com/repos/kokosing/tempto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kokosing/tempto/downloads","issues_url":"https://api.github.com/repos/kokosing/tempto/issues{/number}","pulls_url":"https://api.github.com/repos/kokosing/tempto/pulls{/number}","milestones_url":"https://api.github.com/repos/kokosing/tempto/milestones{/number}","notifications_url":"https://api.github.com/repos/kokosing/tempto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kokosing/tempto/labels{/name}","releases_url":"https://api.github.com/repos/kokosing/tempto/releases{/id}","created_at":"2015-07-16T12:07:31Z","updated_at":"2015-07-16T12:07:31Z","pushed_at":"2015-09-30T21:26:55Z","git_url":"git://github.com/kokosing/tempto.git","ssh_url":"git@github.com:kokosing/tempto.git","clone_url":"https://github.com/kokosing/tempto.git","svn_url":"https://github.com/kokosing/tempto","homepage":"","size":2105,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"prestodb:master","ref":"master","sha":"25b33d42535829477607eccf8c63e03374b2db5c","user":{"login":"prestodb","id":6882181,"avatar_url":"https://avatars.githubusercontent.com/u/6882181?v=3","gravatar_id":"","url":"https://api.github.com/users/prestodb","html_url":"https://github.com/prestodb","followers_url":"https://api.github.com/users/prestodb/followers","following_url":"https://api.github.com/users/prestodb/following{/other_user}","gists_url":"https://api.github.com/users/prestodb/gists{/gist_id}","starred_url":"https://api.github.com/users/prestodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestodb/subscriptions","organizations_url":"https://api.github.com/users/prestodb/orgs","repos_url":"https://api.github.com/users/prestodb/repos","events_url":"https://api.github.com/users/prestodb/events{/privacy}","received_events_url":"https://api.github.com/users/prestodb/received_events","type":"Organization","site_admin":false},"repo":{"id":36050852,"name":"tempto","full_name":"prestodb/tempto","owner":{"login":"prestodb","id":6882181,"avatar_url":"https://avatars.githubusercontent.com/u/6882181?v=3","gravatar_id":"","url":"https://api.github.com/users/prestodb","html_url":"https://github.com/prestodb","followers_url":"https://api.github.com/users/prestodb/followers","following_url":"https://api.github.com/users/prestodb/following{/other_user}","gists_url":"https://api.github.com/users/prestodb/gists{/gist_id}","starred_url":"https://api.github.com/users/prestodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestodb/subscriptions","organizations_url":"https://api.github.com/users/prestodb/orgs","repos_url":"https://api.github.com/users/prestodb/repos","events_url":"https://api.github.com/users/prestodb/events{/privacy}","received_events_url":"https://api.github.com/users/prestodb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prestodb/tempto","description":"A testing framework for Presto","fork":false,"url":"https://api.github.com/repos/prestodb/tempto","forks_url":"https://api.github.com/repos/prestodb/tempto/forks","keys_url":"https://api.github.com/repos/prestodb/tempto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prestodb/tempto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prestodb/tempto/teams","hooks_url":"https://api.github.com/repos/prestodb/tempto/hooks","issue_events_url":"https://api.github.com/repos/prestodb/tempto/issues/events{/number}","events_url":"https://api.github.com/repos/prestodb/tempto/events","assignees_url":"https://api.github.com/repos/prestodb/tempto/assignees{/user}","branches_url":"https://api.github.com/repos/prestodb/tempto/branches{/branch}","tags_url":"https://api.github.com/repos/prestodb/tempto/tags","blobs_url":"https://api.github.com/repos/prestodb/tempto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prestodb/tempto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prestodb/tempto/git/refs{/sha}","trees_url":"https://api.github.com/repos/prestodb/tempto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prestodb/tempto/statuses/{sha}","languages_url":"https://api.github.com/repos/prestodb/tempto/languages","stargazers_url":"https://api.github.com/repos/prestodb/tempto/stargazers","contributors_url":"https://api.github.com/repos/prestodb/tempto/contributors","subscribers_url":"https://api.github.com/repos/prestodb/tempto/subscribers","subscription_url":"https://api.github.com/repos/prestodb/tempto/subscription","commits_url":"https://api.github.com/repos/prestodb/tempto/commits{/sha}","git_commits_url":"https://api.github.com/repos/prestodb/tempto/git/commits{/sha}","comments_url":"https://api.github.com/repos/prestodb/tempto/comments{/number}","issue_comment_url":"https://api.github.com/repos/prestodb/tempto/issues/comments{/number}","contents_url":"https://api.github.com/repos/prestodb/tempto/contents/{+path}","compare_url":"https://api.github.com/repos/prestodb/tempto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prestodb/tempto/merges","archive_url":"https://api.github.com/repos/prestodb/tempto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prestodb/tempto/downloads","issues_url":"https://api.github.com/repos/prestodb/tempto/issues{/number}","pulls_url":"https://api.github.com/repos/prestodb/tempto/pulls{/number}","milestones_url":"https://api.github.com/repos/prestodb/tempto/milestones{/number}","notifications_url":"https://api.github.com/repos/prestodb/tempto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prestodb/tempto/labels{/name}","releases_url":"https://api.github.com/repos/prestodb/tempto/releases{/id}","created_at":"2015-05-22T03:44:37Z","updated_at":"2015-09-21T21:13:21Z","pushed_at":"2015-09-30T21:26:57Z","git_url":"git://github.com/prestodb/tempto.git","ssh_url":"git@github.com:prestodb/tempto.git","clone_url":"https://github.com/prestodb/tempto.git","svn_url":"https://github.com/prestodb/tempto","homepage":"","size":2482,"stargazers_count":20,"watchers_count":20,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":11,"forks":5,"open_issues":11,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prestodb/tempto/pulls/57"},"html":{"href":"https://github.com/prestodb/tempto/pull/57"},"issue":{"href":"https://api.github.com/repos/prestodb/tempto/issues/57"},"comments":{"href":"https://api.github.com/repos/prestodb/tempto/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/prestodb/tempto/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/prestodb/tempto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prestodb/tempto/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/prestodb/tempto/statuses/f872c3b6b1dc9186e0fe7a6b25c99b7ba4aec72b"}}}}