{"action":"created","comment":{"url":"https://api.github.com/repos/square/javawriter/pulls/comments/22606304","id":22606304,"diff_hunk":"@@ -0,0 +1,72 @@\n+/*\n+ * Copyright (C) 2015 Square, Inc.\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+package com.squareup.javawriter.builders;\n+\n+import com.google.common.collect.ImmutableList;\n+\n+import static com.google.common.base.Preconditions.checkArgument;\n+import static com.google.common.base.Preconditions.checkState;\n+\n+/**\n+ * A deferred format string. Unlike {@link java.text.Format} which uses percent {@code %} to escape\n+ * placeholders, this uses {@code $}, and has its own set of permitted placeholders:\n+ *\n+ * <ul>\n+ *   <li>{@code $L} emits the value with no escaping.","path":"src/main/java/com/squareup/javawriter/builders/Snippet.java","position":28,"original_position":28,"commit_id":"4199f548fba89b41af0697ef99a77bcc1fd12990","original_commit_id":"4199f548fba89b41af0697ef99a77bcc1fd12990","user":{"login":"swankjesse","id":133019,"avatar_url":"https://avatars.githubusercontent.com/u/133019?v=3","gravatar_id":"","url":"https://api.github.com/users/swankjesse","html_url":"https://github.com/swankjesse","followers_url":"https://api.github.com/users/swankjesse/followers","following_url":"https://api.github.com/users/swankjesse/following{/other_user}","gists_url":"https://api.github.com/users/swankjesse/gists{/gist_id}","starred_url":"https://api.github.com/users/swankjesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swankjesse/subscriptions","organizations_url":"https://api.github.com/users/swankjesse/orgs","repos_url":"https://api.github.com/users/swankjesse/repos","events_url":"https://api.github.com/users/swankjesse/events{/privacy}","received_events_url":"https://api.github.com/users/swankjesse/received_events","type":"User","site_admin":false},"body":"Good idea. Done.","created_at":"2015-01-07T18:54:06Z","updated_at":"2015-01-07T18:54:06Z","html_url":"https://github.com/square/javawriter/pull/151#discussion_r22606304","pull_request_url":"https://api.github.com/repos/square/javawriter/pulls/151","_links":{"self":{"href":"https://api.github.com/repos/square/javawriter/pulls/comments/22606304"},"html":{"href":"https://github.com/square/javawriter/pull/151#discussion_r22606304"},"pull_request":{"href":"https://api.github.com/repos/square/javawriter/pulls/151"}}},"pull_request":{"url":"https://api.github.com/repos/square/javawriter/pulls/151","id":26920929,"html_url":"https://github.com/square/javawriter/pull/151","diff_url":"https://github.com/square/javawriter/pull/151.diff","patch_url":"https://github.com/square/javawriter/pull/151.patch","issue_url":"https://api.github.com/repos/square/javawriter/issues/151","number":151,"state":"open","locked":false,"title":"First, rough draft of immutable builders.","user":{"login":"swankjesse","id":133019,"avatar_url":"https://avatars.githubusercontent.com/u/133019?v=3","gravatar_id":"","url":"https://api.github.com/users/swankjesse","html_url":"https://github.com/swankjesse","followers_url":"https://api.github.com/users/swankjesse/followers","following_url":"https://api.github.com/users/swankjesse/following{/other_user}","gists_url":"https://api.github.com/users/swankjesse/gists{/gist_id}","starred_url":"https://api.github.com/users/swankjesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swankjesse/subscriptions","organizations_url":"https://api.github.com/users/swankjesse/orgs","repos_url":"https://api.github.com/users/swankjesse/repos","events_url":"https://api.github.com/users/swankjesse/events{/privacy}","received_events_url":"https://api.github.com/users/swankjesse/received_events","type":"User","site_admin":false},"body":"This is currently in its own 'builders' subpackage. I'd like to get\r\nmore of this working, and then move it into the main 'javawriter'\r\npackage, and remove the code that's currently in that package.","created_at":"2015-01-06T21:51:50Z","updated_at":"2015-01-07T18:54:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a0994b2d3aff3550e830e734042a308ec9380a2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/square/javawriter/pulls/151/commits","review_comments_url":"https://api.github.com/repos/square/javawriter/pulls/151/comments","review_comment_url":"https://api.github.com/repos/square/javawriter/pulls/comments/{number}","comments_url":"https://api.github.com/repos/square/javawriter/issues/151/comments","statuses_url":"https://api.github.com/repos/square/javawriter/statuses/4199f548fba89b41af0697ef99a77bcc1fd12990","head":{"label":"square:jwilson_0105_violence","ref":"jwilson_0105_violence","sha":"4199f548fba89b41af0697ef99a77bcc1fd12990","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":7961991,"name":"javawriter","full_name":"square/javawriter","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/javawriter","description":"A utility class which aids in generating Java source files.","fork":false,"url":"https://api.github.com/repos/square/javawriter","forks_url":"https://api.github.com/repos/square/javawriter/forks","keys_url":"https://api.github.com/repos/square/javawriter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/javawriter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/javawriter/teams","hooks_url":"https://api.github.com/repos/square/javawriter/hooks","issue_events_url":"https://api.github.com/repos/square/javawriter/issues/events{/number}","events_url":"https://api.github.com/repos/square/javawriter/events","assignees_url":"https://api.github.com/repos/square/javawriter/assignees{/user}","branches_url":"https://api.github.com/repos/square/javawriter/branches{/branch}","tags_url":"https://api.github.com/repos/square/javawriter/tags","blobs_url":"https://api.github.com/repos/square/javawriter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/javawriter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/javawriter/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/javawriter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/javawriter/statuses/{sha}","languages_url":"https://api.github.com/repos/square/javawriter/languages","stargazers_url":"https://api.github.com/repos/square/javawriter/stargazers","contributors_url":"https://api.github.com/repos/square/javawriter/contributors","subscribers_url":"https://api.github.com/repos/square/javawriter/subscribers","subscription_url":"https://api.github.com/repos/square/javawriter/subscription","commits_url":"https://api.github.com/repos/square/javawriter/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/javawriter/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/javawriter/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/javawriter/issues/comments/{number}","contents_url":"https://api.github.com/repos/square/javawriter/contents/{+path}","compare_url":"https://api.github.com/repos/square/javawriter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/javawriter/merges","archive_url":"https://api.github.com/repos/square/javawriter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/javawriter/downloads","issues_url":"https://api.github.com/repos/square/javawriter/issues{/number}","pulls_url":"https://api.github.com/repos/square/javawriter/pulls{/number}","milestones_url":"https://api.github.com/repos/square/javawriter/milestones{/number}","notifications_url":"https://api.github.com/repos/square/javawriter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/javawriter/labels{/name}","releases_url":"https://api.github.com/repos/square/javawriter/releases{/id}","created_at":"2013-02-01T16:56:30Z","updated_at":"2015-01-07T04:16:42Z","pushed_at":"2015-01-06T22:35:43Z","git_url":"git://github.com/square/javawriter.git","ssh_url":"git@github.com:square/javawriter.git","clone_url":"https://github.com/square/javawriter.git","svn_url":"https://github.com/square/javawriter","homepage":"http://square.github.io/javawriter/","size":2315,"stargazers_count":439,"watchers_count":439,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":100,"mirror_url":null,"open_issues_count":23,"forks":100,"open_issues":23,"watchers":439,"default_branch":"master"}},"base":{"label":"square:master","ref":"master","sha":"12b3d2a3b4ddf036b5f2fced0d23b381909ee382","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":7961991,"name":"javawriter","full_name":"square/javawriter","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/javawriter","description":"A utility class which aids in generating Java source files.","fork":false,"url":"https://api.github.com/repos/square/javawriter","forks_url":"https://api.github.com/repos/square/javawriter/forks","keys_url":"https://api.github.com/repos/square/javawriter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/javawriter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/javawriter/teams","hooks_url":"https://api.github.com/repos/square/javawriter/hooks","issue_events_url":"https://api.github.com/repos/square/javawriter/issues/events{/number}","events_url":"https://api.github.com/repos/square/javawriter/events","assignees_url":"https://api.github.com/repos/square/javawriter/assignees{/user}","branches_url":"https://api.github.com/repos/square/javawriter/branches{/branch}","tags_url":"https://api.github.com/repos/square/javawriter/tags","blobs_url":"https://api.github.com/repos/square/javawriter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/javawriter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/javawriter/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/javawriter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/javawriter/statuses/{sha}","languages_url":"https://api.github.com/repos/square/javawriter/languages","stargazers_url":"https://api.github.com/repos/square/javawriter/stargazers","contributors_url":"https://api.github.com/repos/square/javawriter/contributors","subscribers_url":"https://api.github.com/repos/square/javawriter/subscribers","subscription_url":"https://api.github.com/repos/square/javawriter/subscription","commits_url":"https://api.github.com/repos/square/javawriter/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/javawriter/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/javawriter/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/javawriter/issues/comments/{number}","contents_url":"https://api.github.com/repos/square/javawriter/contents/{+path}","compare_url":"https://api.github.com/repos/square/javawriter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/javawriter/merges","archive_url":"https://api.github.com/repos/square/javawriter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/javawriter/downloads","issues_url":"https://api.github.com/repos/square/javawriter/issues{/number}","pulls_url":"https://api.github.com/repos/square/javawriter/pulls{/number}","milestones_url":"https://api.github.com/repos/square/javawriter/milestones{/number}","notifications_url":"https://api.github.com/repos/square/javawriter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/javawriter/labels{/name}","releases_url":"https://api.github.com/repos/square/javawriter/releases{/id}","created_at":"2013-02-01T16:56:30Z","updated_at":"2015-01-07T04:16:42Z","pushed_at":"2015-01-06T22:35:43Z","git_url":"git://github.com/square/javawriter.git","ssh_url":"git@github.com:square/javawriter.git","clone_url":"https://github.com/square/javawriter.git","svn_url":"https://github.com/square/javawriter","homepage":"http://square.github.io/javawriter/","size":2315,"stargazers_count":439,"watchers_count":439,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":100,"mirror_url":null,"open_issues_count":23,"forks":100,"open_issues":23,"watchers":439,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/square/javawriter/pulls/151"},"html":{"href":"https://github.com/square/javawriter/pull/151"},"issue":{"href":"https://api.github.com/repos/square/javawriter/issues/151"},"comments":{"href":"https://api.github.com/repos/square/javawriter/issues/151/comments"},"review_comments":{"href":"https://api.github.com/repos/square/javawriter/pulls/151/comments"},"review_comment":{"href":"https://api.github.com/repos/square/javawriter/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/square/javawriter/pulls/151/commits"},"statuses":{"href":"https://api.github.com/repos/square/javawriter/statuses/4199f548fba89b41af0697ef99a77bcc1fd12990"}}}}