{"action":"created","issue":{"url":"https://api.github.com/repos/mapstruct/mapstruct/issues/1016","repository_url":"https://api.github.com/repos/mapstruct/mapstruct","labels_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/1016/labels{/name}","comments_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/1016/comments","events_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/1016/events","html_url":"https://github.com/mapstruct/mapstruct/pull/1016","id":197418453,"number":1016,"title":"#975 Part 2: Context params used as source for factory and lifecycle methods","user":{"login":"agudian","id":2737102,"avatar_url":"https://avatars.githubusercontent.com/u/2737102?v=3","gravatar_id":"","url":"https://api.github.com/users/agudian","html_url":"https://github.com/agudian","followers_url":"https://api.github.com/users/agudian/followers","following_url":"https://api.github.com/users/agudian/following{/other_user}","gists_url":"https://api.github.com/users/agudian/gists{/gist_id}","starred_url":"https://api.github.com/users/agudian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agudian/subscriptions","organizations_url":"https://api.github.com/users/agudian/orgs","repos_url":"https://api.github.com/users/agudian/repos","events_url":"https://api.github.com/users/agudian/events{/privacy}","received_events_url":"https://api.github.com/users/agudian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/mapstruct/mapstruct/milestones/15","html_url":"https://github.com/mapstruct/mapstruct/milestone/15","labels_url":"https://api.github.com/repos/mapstruct/mapstruct/milestones/15/labels","id":1960952,"number":15,"title":"1.2.x","description":"Features interesting for a 1.2 release.","creator":{"login":"gunnarmorling","id":28612,"avatar_url":"https://avatars.githubusercontent.com/u/28612?v=3","gravatar_id":"","url":"https://api.github.com/users/gunnarmorling","html_url":"https://github.com/gunnarmorling","followers_url":"https://api.github.com/users/gunnarmorling/followers","following_url":"https://api.github.com/users/gunnarmorling/following{/other_user}","gists_url":"https://api.github.com/users/gunnarmorling/gists{/gist_id}","starred_url":"https://api.github.com/users/gunnarmorling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunnarmorling/subscriptions","organizations_url":"https://api.github.com/users/gunnarmorling/orgs","repos_url":"https://api.github.com/users/gunnarmorling/repos","events_url":"https://api.github.com/users/gunnarmorling/events{/privacy}","received_events_url":"https://api.github.com/users/gunnarmorling/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":20,"state":"open","created_at":"2016-08-24T16:04:54Z","updated_at":"2017-01-05T20:22:27Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2016-12-23T19:41:25Z","updated_at":"2017-01-05T22:10:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mapstruct/mapstruct/pulls/1016","html_url":"https://github.com/mapstruct/mapstruct/pull/1016","diff_url":"https://github.com/mapstruct/mapstruct/pull/1016.diff","patch_url":"https://github.com/mapstruct/mapstruct/pull/1016.patch"},"body":"Only the last commit is new here, the first commits are identical to what's open in PR #1006.\r\n\r\nI've already worked in the changes in the Javadoc of `Context` and `ObjectFactory`. I'll do the adaptation of `BeforeMapping` / `AfterMapping` seperately in a PR for #992, if that's okay.\r\n\r\nThe introduction of `@Context` in the ref-docs will be included in this PR later on (probably after christmas), but I wanted to show you how it's coming along. Code-wise, I'm finished with it so you could play around if you like."},"comment":{"url":"https://api.github.com/repos/mapstruct/mapstruct/issues/comments/270772390","html_url":"https://github.com/mapstruct/mapstruct/pull/1016#issuecomment-270772390","issue_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/1016","id":270772390,"user":{"login":"agudian","id":2737102,"avatar_url":"https://avatars.githubusercontent.com/u/2737102?v=3","gravatar_id":"","url":"https://api.github.com/users/agudian","html_url":"https://github.com/agudian","followers_url":"https://api.github.com/users/agudian/followers","following_url":"https://api.github.com/users/agudian/following{/other_user}","gists_url":"https://api.github.com/users/agudian/gists{/gist_id}","starred_url":"https://api.github.com/users/agudian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agudian/subscriptions","organizations_url":"https://api.github.com/users/agudian/orgs","repos_url":"https://api.github.com/users/agudian/repos","events_url":"https://api.github.com/users/agudian/events{/privacy}","received_events_url":"https://api.github.com/users/agudian/received_events","type":"User","site_admin":false},"created_at":"2017-01-05T22:10:38Z","updated_at":"2017-01-05T22:10:38Z","body":"> So far I understood the context parameter(s) would just be passed through, but you seem to imply that their methods would potentially be invoked by generated code?\r\n\r\nThat's the whole point of this PR 👍. You can have `@BeforeMapping` / `@AfterMapping` and `@ObjectFactory` methods declared on the type of the context parameter. Check the type `SelfContainingCycleContext` in the tests and it's usages for one example of what to do with that."}}
{"actor":{"display_login":"agudian"}}