{"action":"created","issue":{"url":"https://api.github.com/repos/immutables/immutables/issues/490","repository_url":"https://api.github.com/repos/immutables/immutables","labels_url":"https://api.github.com/repos/immutables/immutables/issues/490/labels{/name}","comments_url":"https://api.github.com/repos/immutables/immutables/issues/490/comments","events_url":"https://api.github.com/repos/immutables/immutables/issues/490/events","html_url":"https://github.com/immutables/immutables/issues/490","id":189698510,"number":490,"title":"Possible to define Builder in super-type?","user":{"login":"renedewaele","id":1589650,"avatar_url":"https://avatars.githubusercontent.com/u/1589650?v=3","gravatar_id":"","url":"https://api.github.com/users/renedewaele","html_url":"https://github.com/renedewaele","followers_url":"https://api.github.com/users/renedewaele/followers","following_url":"https://api.github.com/users/renedewaele/following{/other_user}","gists_url":"https://api.github.com/users/renedewaele/gists{/gist_id}","starred_url":"https://api.github.com/users/renedewaele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renedewaele/subscriptions","organizations_url":"https://api.github.com/users/renedewaele/orgs","repos_url":"https://api.github.com/users/renedewaele/repos","events_url":"https://api.github.com/users/renedewaele/events{/privacy}","received_events_url":"https://api.github.com/users/renedewaele/received_events","type":"User","site_admin":false},"labels":[{"id":344395141,"url":"https://api.github.com/repos/immutables/immutables/labels/knowledgebase","name":"knowledgebase","color":"5319e7","default":false},{"id":46751412,"url":"https://api.github.com/repos/immutables/immutables/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-16T13:07:28Z","updated_at":"2016-11-17T21:08:35Z","closed_at":null,"body":"I'm struggling with the following. As it is something pretty basic I'm guessing it is possible using the framework but I don't know how.\r\n\r\nI have an abstract type `A` and two `Value.Immutable` annotated types `B` and `C` that extend from `A`. Say I now got an object of type `A` (so actually a `B` or `C`) and want to create a copy of the object with modifications what do I do?\r\n\r\nIdeally I want to define an abstract Builder on the supertype that I can use to make a copy (with changed attributes if desired).\r\n\r\nIs such a thing possible?"},"comment":{"url":"https://api.github.com/repos/immutables/immutables/issues/comments/261369997","html_url":"https://github.com/immutables/immutables/issues/490#issuecomment-261369997","issue_url":"https://api.github.com/repos/immutables/immutables/issues/490","id":261369997,"user":{"login":"elucash","id":1692611,"avatar_url":"https://avatars.githubusercontent.com/u/1692611?v=3","gravatar_id":"","url":"https://api.github.com/users/elucash","html_url":"https://github.com/elucash","followers_url":"https://api.github.com/users/elucash/followers","following_url":"https://api.github.com/users/elucash/following{/other_user}","gists_url":"https://api.github.com/users/elucash/gists{/gist_id}","starred_url":"https://api.github.com/users/elucash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elucash/subscriptions","organizations_url":"https://api.github.com/users/elucash/orgs","repos_url":"https://api.github.com/users/elucash/repos","events_url":"https://api.github.com/users/elucash/events{/privacy}","received_events_url":"https://api.github.com/users/elucash/received_events","type":"User","site_admin":false},"created_at":"2016-11-17T21:08:35Z","updated_at":"2016-11-17T21:08:35Z","body":"We already generating `With*` interface for copy methods, but not for builder yet. You can evaluate the functionality like this\r\n\r\n```java\r\n@Value.Immutable\r\ninterface A extends WithA {\r\n  int a();\r\n}\r\n```\r\n\r\nThe naming pattern is derived from `Value.Style.typeWith` attribute. I would be very glad is someone could contribute implementation for `Builder` inside `With` interface. Otherwise, I can come to this only after some time."}}
{"actor":{"display_login":"elucash"}}