{"action":"created","issue":{"url":"https://api.github.com/repos/atteo/classindex/issues/28","labels_url":"https://api.github.com/repos/atteo/classindex/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/atteo/classindex/issues/28/comments","events_url":"https://api.github.com/repos/atteo/classindex/issues/28/events","html_url":"https://github.com/atteo/classindex/issues/28","id":64524505,"number":28,"title":"attach meta info?","user":{"login":"stephanos","id":159852,"avatar_url":"https://avatars.githubusercontent.com/u/159852?v=3","gravatar_id":"","url":"https://api.github.com/users/stephanos","html_url":"https://github.com/stephanos","followers_url":"https://api.github.com/users/stephanos/followers","following_url":"https://api.github.com/users/stephanos/following{/other_user}","gists_url":"https://api.github.com/users/stephanos/gists{/gist_id}","starred_url":"https://api.github.com/users/stephanos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephanos/subscriptions","organizations_url":"https://api.github.com/users/stephanos/orgs","repos_url":"https://api.github.com/users/stephanos/repos","events_url":"https://api.github.com/users/stephanos/events{/privacy}","received_events_url":"https://api.github.com/users/stephanos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-26T13:19:45Z","updated_at":"2015-03-26T13:50:42Z","closed_at":null,"body":"Would it be feasible to attach meta information to each class in the index?\r\n\r\nHere is our use case:\r\nWe have several hundred pages, they all inherit from BasePage.java. There is also a mapping file, PageIndex.java they is basically a big hash map that looks like this:\r\n```java\r\n   .put(\"/some/path\", \"com.myproject.pages.XYZ\")\r\n```\r\n\r\nThe reason we need to use the full qualified name is that we want to prevent the classloading of the page (slow on our platform). So in order to apply classindex to this we'd need to attach the page's path to the index (since we can't load the entire class and evaluate any runtime annotations).\r\n\r\nSo, basically I'd imagine a annotation like @IndexMeta(\"/some/path\") and the ability to read it from the classindex API.\r\n\r\nI know this is quite a big concept, but I just wanted to throw it out there :)\r\n\r\nStephan"},"comment":{"url":"https://api.github.com/repos/atteo/classindex/issues/comments/86519774","html_url":"https://github.com/atteo/classindex/issues/28#issuecomment-86519774","issue_url":"https://api.github.com/repos/atteo/classindex/issues/28","id":86519774,"user":{"login":"marembo2008","id":4571361,"avatar_url":"https://avatars.githubusercontent.com/u/4571361?v=3","gravatar_id":"","url":"https://api.github.com/users/marembo2008","html_url":"https://github.com/marembo2008","followers_url":"https://api.github.com/users/marembo2008/followers","following_url":"https://api.github.com/users/marembo2008/following{/other_user}","gists_url":"https://api.github.com/users/marembo2008/gists{/gist_id}","starred_url":"https://api.github.com/users/marembo2008/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marembo2008/subscriptions","organizations_url":"https://api.github.com/users/marembo2008/orgs","repos_url":"https://api.github.com/users/marembo2008/repos","events_url":"https://api.github.com/users/marembo2008/events{/privacy}","received_events_url":"https://api.github.com/users/marembo2008/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T13:50:42Z","updated_at":"2015-03-26T13:50:42Z","body":"So i guess you would like to do something like:\r\n```\r\nfinal PageIndex pageIndex = getHoldOfPageIndexForPath(\"/some/path\");\r\nClass<? extends BasePage> pageClass = ClassIndex.getAnnotated(pageIndex);\r\n```\r\nSo that you load the class at the point it is needed.\r\nThat would be a big toll, and the use case may actually be there, as i do this quite often in CDI.\r\nI would try to tickle with it, and then see if i can actually add such a functionality. if you do before me, let me get an update"}}