{"action":"created","comment":{"url":"https://api.github.com/repos/broadinstitute/barclay/pulls/comments/152322922","pull_request_review_id":78167203,"id":152322922,"diff_hunk":"@@ -76,103 +110,127 @@\n     public abstract List<String> getPackageNames();\n \n     /**\n-     * Give this descriptor a chance to filter out any classes it doesn't want to be\n-     * dynamically discoverable.\n-     * @return false if the class shouldn't be used; otherwise true\n+     * Base class for all command line plugin classes managed by this descriptor. Subclasses of\n+     * this class in any of the packages returned by {@link #getPackageNames} will be command line\n+     * accessible.\n      */\n-    public Predicate<Class<?>> getClassFilter() { return c -> true;}\n+    public abstract Class<?> getPluginBaseClass();\n \n     /**\n-     * Return an instance of the specified pluggable class. The descriptor should\n-     * instantiate or otherwise obtain (possibly by having been provided an instance\n-     * through the descriptor's constructor) an instance of this plugin class.\n-     * The descriptor should maintain a list of these instances so they can later\n-     * be retrieved by {@link #getAllInstances}.\n+     * Determine if a plugin class should be retained for this descriptor. Return true if the\n+     * descriptor wants this class to be included in from the list of plugins discovered dynamically.\n      *\n-     * In addition, implementations should recognize and reject any attempt to instantiate\n-     * a second instance of a plugin that has the same simple class name as another plugin\n-     * controlled by this descriptor (which can happen if they have different qualified names\n-     * within the base package used by the descriptor) since the user has no way to disambiguate\n-     * these on the command line).\n+     * @return false if the plugin class shouldn't be used; otherwise true\n+     */\n+    public boolean includePluginClass(Class<?> c) { return true;}","path":"src/main/java/org/broadinstitute/barclay/argparser/CommandLinePluginDescriptor.java","position":190,"original_position":190,"commit_id":"43a2fd9ec44ce4df89b33bcdfe1413bb7bcdb6f9","original_commit_id":"43a2fd9ec44ce4df89b33bcdfe1413bb7bcdb6f9","user":{"login":"cmnbroad","id":10062863,"avatar_url":"https://avatars2.githubusercontent.com/u/10062863?v=4","gravatar_id":"","url":"https://api.github.com/users/cmnbroad","html_url":"https://github.com/cmnbroad","followers_url":"https://api.github.com/users/cmnbroad/followers","following_url":"https://api.github.com/users/cmnbroad/following{/other_user}","gists_url":"https://api.github.com/users/cmnbroad/gists{/gist_id}","starred_url":"https://api.github.com/users/cmnbroad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmnbroad/subscriptions","organizations_url":"https://api.github.com/users/cmnbroad/orgs","repos_url":"https://api.github.com/users/cmnbroad/repos","events_url":"https://api.github.com/users/cmnbroad/events{/privacy}","received_events_url":"https://api.github.com/users/cmnbroad/received_events","type":"User","site_admin":false},"body":"We can't use a type bound here, even a lower bound, since it would preclude the Barclay CLP or any code that doesn't have compile time knowledge of T from calling the method. We COULD use isAssignableFrom in the default implementation as a substitute, if thats what you're suggesting. It would never fail though, unless there was a bug in Barclay, which it would mask. It does seem more correct though.","created_at":"2017-11-21T16:10:29Z","updated_at":"2017-11-21T16:10:30Z","html_url":"https://github.com/broadinstitute/barclay/pull/38#discussion_r152322922","pull_request_url":"https://api.github.com/repos/broadinstitute/barclay/pulls/38","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/barclay/pulls/comments/152322922"},"html":{"href":"https://github.com/broadinstitute/barclay/pull/38#discussion_r152322922"},"pull_request":{"href":"https://api.github.com/repos/broadinstitute/barclay/pulls/38"}},"in_reply_to_id":152304131},"pull_request":{"url":"https://api.github.com/repos/broadinstitute/barclay/pulls/38","id":104719309,"html_url":"https://github.com/broadinstitute/barclay/pull/38","diff_url":"https://github.com/broadinstitute/barclay/pull/38.diff","patch_url":"https://github.com/broadinstitute/barclay/pull/38.patch","issue_url":"https://api.github.com/repos/broadinstitute/barclay/issues/38","number":38,"state":"open","locked":false,"title":"Proposed updates to CommandLinePluginDescriptor interface. DO NOT MERGE.","user":{"login":"cmnbroad","id":10062863,"avatar_url":"https://avatars2.githubusercontent.com/u/10062863?v=4","gravatar_id":"","url":"https://api.github.com/users/cmnbroad","html_url":"https://github.com/cmnbroad","followers_url":"https://api.github.com/users/cmnbroad/followers","following_url":"https://api.github.com/users/cmnbroad/following{/other_user}","gists_url":"https://api.github.com/users/cmnbroad/gists{/gist_id}","starred_url":"https://api.github.com/users/cmnbroad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmnbroad/subscriptions","organizations_url":"https://api.github.com/users/cmnbroad/orgs","repos_url":"https://api.github.com/users/cmnbroad/repos","events_url":"https://api.github.com/users/cmnbroad/events{/privacy}","received_events_url":"https://api.github.com/users/cmnbroad/received_events","type":"User","site_admin":false},"body":"DO NOT MERGE.\r\n\r\n@magicDGS Please take a look at the changes to the descriptor interface in this branch. I've changed some names, as well as some method contract descriptions.\r\n\r\nIf the read filter plugin implemented this interface, and you had the ability inject argument definitions as you do in https://github.com/broadinstitute/gatk/pull/2355, would that be sufficient to enable your filter plugin use cases using just method overrides ?\r\n\r\nSummary of the main changes I made:\r\n\r\n- getAllInstances -> getResolvedInstances (changed contract to return all “resolved” instances, including defaults, and note that resulting list may be different if called pre/post parseArgs)\r\n- getDefaultInstances -> getDefaultInstances (changed contract to say the resulting list may be different if called pre/post parseArgs)\r\n- getPluginClass -> getPluginBaseClass\r\n- getClassFilter -> includePluginClass (simplified to return a boolean rather than a predicate)\r\n- getInstance -> createInstanceForPlugin\r\n- validateArguments -> validateAndResolvePlugins\r\n","created_at":"2017-02-05T22:41:04Z","updated_at":"2017-11-21T16:10:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a3227c21c3e957fd42d0e10ff6d24ef7e1bbd181","assignee":{"login":"cmnbroad","id":10062863,"avatar_url":"https://avatars2.githubusercontent.com/u/10062863?v=4","gravatar_id":"","url":"https://api.github.com/users/cmnbroad","html_url":"https://github.com/cmnbroad","followers_url":"https://api.github.com/users/cmnbroad/followers","following_url":"https://api.github.com/users/cmnbroad/following{/other_user}","gists_url":"https://api.github.com/users/cmnbroad/gists{/gist_id}","starred_url":"https://api.github.com/users/cmnbroad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmnbroad/subscriptions","organizations_url":"https://api.github.com/users/cmnbroad/orgs","repos_url":"https://api.github.com/users/cmnbroad/repos","events_url":"https://api.github.com/users/cmnbroad/events{/privacy}","received_events_url":"https://api.github.com/users/cmnbroad/received_events","type":"User","site_admin":false},"assignees":[{"login":"cmnbroad","id":10062863,"avatar_url":"https://avatars2.githubusercontent.com/u/10062863?v=4","gravatar_id":"","url":"https://api.github.com/users/cmnbroad","html_url":"https://github.com/cmnbroad","followers_url":"https://api.github.com/users/cmnbroad/followers","following_url":"https://api.github.com/users/cmnbroad/following{/other_user}","gists_url":"https://api.github.com/users/cmnbroad/gists{/gist_id}","starred_url":"https://api.github.com/users/cmnbroad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmnbroad/subscriptions","organizations_url":"https://api.github.com/users/cmnbroad/orgs","repos_url":"https://api.github.com/users/cmnbroad/repos","events_url":"https://api.github.com/users/cmnbroad/events{/privacy}","received_events_url":"https://api.github.com/users/cmnbroad/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"jamesemery","id":16102845,"avatar_url":"https://avatars2.githubusercontent.com/u/16102845?v=4","gravatar_id":"","url":"https://api.github.com/users/jamesemery","html_url":"https://github.com/jamesemery","followers_url":"https://api.github.com/users/jamesemery/followers","following_url":"https://api.github.com/users/jamesemery/following{/other_user}","gists_url":"https://api.github.com/users/jamesemery/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesemery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesemery/subscriptions","organizations_url":"https://api.github.com/users/jamesemery/orgs","repos_url":"https://api.github.com/users/jamesemery/repos","events_url":"https://api.github.com/users/jamesemery/events{/privacy}","received_events_url":"https://api.github.com/users/jamesemery/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/broadinstitute/barclay/pulls/38/commits","review_comments_url":"https://api.github.com/repos/broadinstitute/barclay/pulls/38/comments","review_comment_url":"https://api.github.com/repos/broadinstitute/barclay/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broadinstitute/barclay/issues/38/comments","statuses_url":"https://api.github.com/repos/broadinstitute/barclay/statuses/43a2fd9ec44ce4df89b33bcdfe1413bb7bcdb6f9","head":{"label":"broadinstitute:cn_update_plugin_interface","ref":"cn_update_plugin_interface","sha":"43a2fd9ec44ce4df89b33bcdfe1413bb7bcdb6f9","user":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"repo":{"id":72048480,"name":"barclay","full_name":"broadinstitute/barclay","owner":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/broadinstitute/barclay","description":"Command line argument parser and online documentation generation utilities for java command line programs.","fork":false,"url":"https://api.github.com/repos/broadinstitute/barclay","forks_url":"https://api.github.com/repos/broadinstitute/barclay/forks","keys_url":"https://api.github.com/repos/broadinstitute/barclay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/barclay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/barclay/teams","hooks_url":"https://api.github.com/repos/broadinstitute/barclay/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/barclay/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/barclay/events","assignees_url":"https://api.github.com/repos/broadinstitute/barclay/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/barclay/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/barclay/tags","blobs_url":"https://api.github.com/repos/broadinstitute/barclay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/barclay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/barclay/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/barclay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/barclay/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/barclay/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/barclay/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/barclay/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/barclay/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/barclay/subscription","commits_url":"https://api.github.com/repos/broadinstitute/barclay/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/barclay/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/barclay/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/barclay/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/barclay/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/barclay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/barclay/merges","archive_url":"https://api.github.com/repos/broadinstitute/barclay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/barclay/downloads","issues_url":"https://api.github.com/repos/broadinstitute/barclay/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/barclay/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/barclay/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/barclay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/barclay/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/barclay/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/barclay/deployments","created_at":"2016-10-26T22:06:44Z","updated_at":"2017-09-06T00:50:28Z","pushed_at":"2017-11-21T15:42:52Z","git_url":"git://github.com/broadinstitute/barclay.git","ssh_url":"git@github.com:broadinstitute/barclay.git","clone_url":"https://github.com/broadinstitute/barclay.git","svn_url":"https://github.com/broadinstitute/barclay","homepage":null,"size":426,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":45,"forks":2,"open_issues":45,"watchers":5,"default_branch":"master"}},"base":{"label":"broadinstitute:master","ref":"master","sha":"61857ed9250a2c0e26d06a10ef067b39b8136e1d","user":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"repo":{"id":72048480,"name":"barclay","full_name":"broadinstitute/barclay","owner":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/broadinstitute/barclay","description":"Command line argument parser and online documentation generation utilities for java command line programs.","fork":false,"url":"https://api.github.com/repos/broadinstitute/barclay","forks_url":"https://api.github.com/repos/broadinstitute/barclay/forks","keys_url":"https://api.github.com/repos/broadinstitute/barclay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/barclay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/barclay/teams","hooks_url":"https://api.github.com/repos/broadinstitute/barclay/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/barclay/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/barclay/events","assignees_url":"https://api.github.com/repos/broadinstitute/barclay/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/barclay/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/barclay/tags","blobs_url":"https://api.github.com/repos/broadinstitute/barclay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/barclay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/barclay/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/barclay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/barclay/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/barclay/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/barclay/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/barclay/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/barclay/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/barclay/subscription","commits_url":"https://api.github.com/repos/broadinstitute/barclay/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/barclay/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/barclay/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/barclay/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/barclay/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/barclay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/barclay/merges","archive_url":"https://api.github.com/repos/broadinstitute/barclay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/barclay/downloads","issues_url":"https://api.github.com/repos/broadinstitute/barclay/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/barclay/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/barclay/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/barclay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/barclay/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/barclay/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/barclay/deployments","created_at":"2016-10-26T22:06:44Z","updated_at":"2017-09-06T00:50:28Z","pushed_at":"2017-11-21T15:42:52Z","git_url":"git://github.com/broadinstitute/barclay.git","ssh_url":"git@github.com:broadinstitute/barclay.git","clone_url":"https://github.com/broadinstitute/barclay.git","svn_url":"https://github.com/broadinstitute/barclay","homepage":null,"size":426,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":45,"forks":2,"open_issues":45,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/barclay/pulls/38"},"html":{"href":"https://github.com/broadinstitute/barclay/pull/38"},"issue":{"href":"https://api.github.com/repos/broadinstitute/barclay/issues/38"},"comments":{"href":"https://api.github.com/repos/broadinstitute/barclay/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/broadinstitute/barclay/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/broadinstitute/barclay/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broadinstitute/barclay/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/broadinstitute/barclay/statuses/43a2fd9ec44ce4df89b33bcdfe1413bb7bcdb6f9"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"cmnbroad"}}