-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
attach meta info? #28
Comments
I think the classindex does not need to add this.
And then at boot, in your post construct, or however you do it, you just process the pages
|
The |
So i guess you would like to do something like:
So that you load the class at the point it is needed. |
Actually I want to do this: void initializePageIndeces(){
HashMap<String, String> pathToPageClassName = new HashMap<>();
Iterable<String> pageClasses = ClassIndex.getSubclassesNames(BasePage.class);
for (String pageClass : pageClasses) {
String path = (String) ClassIndex.getSubclassMetaData(BasePage.class, pageClass);
pathToPageClassName.put(path, pageClass);
}
} I should have written this in the first place :) |
Would it be feasible to attach meta information to each class in the index?
Here is our use case:
We 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:
The 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).
So, basically I'd imagine a annotation like @IndexMeta("/some/path") and the ability to read it from the classindex API.
I know this is quite a big concept, but I just wanted to throw it out there :)
Stephan
The text was updated successfully, but these errors were encountered: