{"action":"created","issue":{"url":"https://api.github.com/repos/phax/jcodemodel/issues/28","labels_url":"https://api.github.com/repos/phax/jcodemodel/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/phax/jcodemodel/issues/28/comments","events_url":"https://api.github.com/repos/phax/jcodemodel/issues/28/events","html_url":"https://github.com/phax/jcodemodel/issues/28","id":106212166,"number":28,"title":"Add API to reference enum constants of a JDirectClass","user":{"login":"WonderCsabo","id":480485,"avatar_url":"https://avatars.githubusercontent.com/u/480485?v=3","gravatar_id":"","url":"https://api.github.com/users/WonderCsabo","html_url":"https://github.com/WonderCsabo","followers_url":"https://api.github.com/users/WonderCsabo/followers","following_url":"https://api.github.com/users/WonderCsabo/following{/other_user}","gists_url":"https://api.github.com/users/WonderCsabo/gists{/gist_id}","starred_url":"https://api.github.com/users/WonderCsabo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WonderCsabo/subscriptions","organizations_url":"https://api.github.com/users/WonderCsabo/orgs","repos_url":"https://api.github.com/users/WonderCsabo/repos","events_url":"https://api.github.com/users/WonderCsabo/events{/privacy}","received_events_url":"https://api.github.com/users/WonderCsabo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"phax","id":196219,"avatar_url":"https://avatars.githubusercontent.com/u/196219?v=3","gravatar_id":"","url":"https://api.github.com/users/phax","html_url":"https://github.com/phax","followers_url":"https://api.github.com/users/phax/followers","following_url":"https://api.github.com/users/phax/following{/other_user}","gists_url":"https://api.github.com/users/phax/gists{/gist_id}","starred_url":"https://api.github.com/users/phax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phax/subscriptions","organizations_url":"https://api.github.com/users/phax/orgs","repos_url":"https://api.github.com/users/phax/repos","events_url":"https://api.github.com/users/phax/events{/privacy}","received_events_url":"https://api.github.com/users/phax/received_events","type":"User","site_admin":false},"milestone":null,"comments":20,"created_at":"2015-09-13T11:50:12Z","updated_at":"2015-10-11T09:49:46Z","closed_at":"2015-09-14T13:03:27Z","body":"Sometimes in code generation, we have to reference an enum constant of a class which is not generated, just referenced. Currently there is no way to do this, only for defined (generated classes). Currently we have to use an ugly workaround:\r\n```java\r\nAbstractJClass referencedClass = ...\r\nIJExpression expression = JExpr.direct(referencedClass.fullName() + \".\" + \"ONE_CONSTANT\");\r\n```"},"comment":{"url":"https://api.github.com/repos/phax/jcodemodel/issues/comments/147177235","html_url":"https://github.com/phax/jcodemodel/issues/28#issuecomment-147177235","issue_url":"https://api.github.com/repos/phax/jcodemodel/issues/28","id":147177235,"user":{"login":"sviperll","id":53340,"avatar_url":"https://avatars.githubusercontent.com/u/53340?v=3","gravatar_id":"","url":"https://api.github.com/users/sviperll","html_url":"https://github.com/sviperll","followers_url":"https://api.github.com/users/sviperll/followers","following_url":"https://api.github.com/users/sviperll/following{/other_user}","gists_url":"https://api.github.com/users/sviperll/gists{/gist_id}","starred_url":"https://api.github.com/users/sviperll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sviperll/subscriptions","organizations_url":"https://api.github.com/users/sviperll/orgs","repos_url":"https://api.github.com/users/sviperll/repos","events_url":"https://api.github.com/users/sviperll/events{/privacy}","received_events_url":"https://api.github.com/users/sviperll/received_events","type":"User","site_admin":false},"created_at":"2015-10-11T09:49:46Z","updated_at":"2015-10-11T09:49:46Z","body":"@phax I've actually planned to include this into jcodemodel from the beginning. I've made it into standalone package to primarily speed up iteration to find better design. I'll try to move it into jcodemodel during upcomming week."}}