{"action":"created","issue":{"url":"https://api.github.com/repos/raphw/byte-buddy/issues/158","repository_url":"https://api.github.com/repos/raphw/byte-buddy","labels_url":"https://api.github.com/repos/raphw/byte-buddy/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/raphw/byte-buddy/issues/158/comments","events_url":"https://api.github.com/repos/raphw/byte-buddy/issues/158/events","html_url":"https://github.com/raphw/byte-buddy/issues/158","id":167382001,"number":158,"title":"FieldProxy improvement","user":{"login":"bric3","id":803621,"avatar_url":"https://avatars.githubusercontent.com/u/803621?v=3","gravatar_id":"","url":"https://api.github.com/users/bric3","html_url":"https://github.com/bric3","followers_url":"https://api.github.com/users/bric3/followers","following_url":"https://api.github.com/users/bric3/following{/other_user}","gists_url":"https://api.github.com/users/bric3/gists{/gist_id}","starred_url":"https://api.github.com/users/bric3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bric3/subscriptions","organizations_url":"https://api.github.com/users/bric3/orgs","repos_url":"https://api.github.com/users/bric3/repos","events_url":"https://api.github.com/users/bric3/events{/privacy}","received_events_url":"https://api.github.com/users/bric3/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/raphw/byte-buddy/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"raphw","id":4489328,"avatar_url":"https://avatars.githubusercontent.com/u/4489328?v=3","gravatar_id":"","url":"https://api.github.com/users/raphw","html_url":"https://github.com/raphw","followers_url":"https://api.github.com/users/raphw/followers","following_url":"https://api.github.com/users/raphw/following{/other_user}","gists_url":"https://api.github.com/users/raphw/gists{/gist_id}","starred_url":"https://api.github.com/users/raphw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphw/subscriptions","organizations_url":"https://api.github.com/users/raphw/orgs","repos_url":"https://api.github.com/users/raphw/repos","events_url":"https://api.github.com/users/raphw/events{/privacy}","received_events_url":"https://api.github.com/users/raphw/received_events","type":"User","site_admin":false},"assignees":[{"login":"raphw","id":4489328,"avatar_url":"https://avatars.githubusercontent.com/u/4489328?v=3","gravatar_id":"","url":"https://api.github.com/users/raphw","html_url":"https://github.com/raphw","followers_url":"https://api.github.com/users/raphw/followers","following_url":"https://api.github.com/users/raphw/following{/other_user}","gists_url":"https://api.github.com/users/raphw/gists{/gist_id}","starred_url":"https://api.github.com/users/raphw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphw/subscriptions","organizations_url":"https://api.github.com/users/raphw/orgs","repos_url":"https://api.github.com/users/raphw/repos","events_url":"https://api.github.com/users/raphw/events{/privacy}","received_events_url":"https://api.github.com/users/raphw/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/raphw/byte-buddy/milestones/58","html_url":"https://github.com/raphw/byte-buddy/milestones/1.4.16","labels_url":"https://api.github.com/repos/raphw/byte-buddy/milestones/58/labels","id":1902766,"number":58,"title":"1.4.16","description":null,"creator":{"login":"raphw","id":4489328,"avatar_url":"https://avatars.githubusercontent.com/u/4489328?v=3","gravatar_id":"","url":"https://api.github.com/users/raphw","html_url":"https://github.com/raphw","followers_url":"https://api.github.com/users/raphw/followers","following_url":"https://api.github.com/users/raphw/following{/other_user}","gists_url":"https://api.github.com/users/raphw/gists{/gist_id}","starred_url":"https://api.github.com/users/raphw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphw/subscriptions","organizations_url":"https://api.github.com/users/raphw/orgs","repos_url":"https://api.github.com/users/raphw/repos","events_url":"https://api.github.com/users/raphw/events{/privacy}","received_events_url":"https://api.github.com/users/raphw/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":3,"state":"open","created_at":"2016-07-25T15:30:22Z","updated_at":"2016-08-04T08:50:59Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-07-25T14:37:33Z","updated_at":"2016-08-04T08:50:59Z","closed_at":"2016-08-04T08:50:59Z","body":"Hi @raphw \r\n\r\nI recently tried the `FieldProxy` class, and looking at the Javadoc only I thought there could be some improvements, currently the javadoc says \r\n\r\n```\r\nThe getter type must be defined in a single-method interface\r\nwith a single method that returns an {@link java.lang.Object} type and takes no arguments. The getter interface\r\nmust similarly return {@code void} and take a single {@link java.lang.Object} argument.\r\n```\r\n\r\nThe javadoc could advise to use generics this way : \r\n\r\n```java\r\npublic interface Get<T> {\r\n    T get();\r\n}\r\n\r\npublic interface Set<T> {\r\n    void set(T value);\r\n}\r\n```\r\n\r\nAlso this line `Using this annotation it is possible to access fields by getter and setter types.` could be strengthen the point that is either a getter **or** a setter type, if one wants both to read and set a field he should declare two parameters.\r\n\r\n```java\r\n@FieldProxy(\"buffer\") Get<ByteBuffer> bufferGetter,\r\n@FieldProxy(\"buffer\") Set<ByteBuffer> bufferSetter,\r\n```\r\n\r\n\r\nAlso why not allowing this kind of interface (typed and two methods) ?\r\n\r\n```java\r\npublic interface BufferAccessor {\r\n    ByteBuffer get();\r\n    void set(ByteBuffer value);\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/raphw/byte-buddy/issues/comments/237492639","html_url":"https://github.com/raphw/byte-buddy/issues/158#issuecomment-237492639","issue_url":"https://api.github.com/repos/raphw/byte-buddy/issues/158","id":237492639,"user":{"login":"raphw","id":4489328,"avatar_url":"https://avatars.githubusercontent.com/u/4489328?v=3","gravatar_id":"","url":"https://api.github.com/users/raphw","html_url":"https://github.com/raphw","followers_url":"https://api.github.com/users/raphw/followers","following_url":"https://api.github.com/users/raphw/following{/other_user}","gists_url":"https://api.github.com/users/raphw/gists{/gist_id}","starred_url":"https://api.github.com/users/raphw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphw/subscriptions","organizations_url":"https://api.github.com/users/raphw/orgs","repos_url":"https://api.github.com/users/raphw/repos","events_url":"https://api.github.com/users/raphw/events{/privacy}","received_events_url":"https://api.github.com/users/raphw/received_events","type":"User","site_admin":false},"created_at":"2016-08-04T08:50:58Z","updated_at":"2016-08-04T08:50:58Z","body":"I looked at this yesterday night and remembered why I split this up. Declaring a setter proxy exlcudes an interceptor if the located field is `final`. This allows for easy resolution. I did however add an overloaded version of the installer where a combined getter/setter proxy type can be specified. If the setter is called on a `final` field, this proxy now throws an `UnsupportedOperationException`. A user can now choose between the two depending on which one is more appropriate.\r\n\r\nFixed on head."}}
{"actor":{"display_login":"raphw"}}