Skip to content

Conversation

@luckybilly
Copy link
Contributor

scan all classes with package name: com.alibaba.android.arouter.routers at compile time, and generating code to call constructor of these class into LogisticsCenter. LoadRouterMap () method by bytecode inserting. Then ARouter framework can initialize router map by calling loadRouterMap().
after code generating, loadRouterMap method looks like below:

private static void loadRouterMap() {
    registerRouteRoot(new ARouter..Root..modulejava());
    registerRouteRoot(new ARouter..Root..modulekotlin());
}

App doesn't need to iterate through all of the dex files to find these classes at run time, and it doesn't need reflection to get objects

…,providers and interceptors by generating bytecode.
@avenue2013
Copy link

这个怎么用啊?

@luckybilly
Copy link
Contributor Author

@avenue2013这里 第6条的介绍。
中文看这里,也是第6条

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants