Skip to content
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

getTargetService 性能有点低 #40

Open
JuneLeo opened this issue Jul 2, 2020 · 0 comments
Open

getTargetService 性能有点低 #40

JuneLeo opened this issue Jul 2, 2020 · 0 comments

Comments

@JuneLeo
Copy link

JuneLeo commented Jul 2, 2020

可以只put一次;
private static Object getTargetService(String proName) {
HashMap hashMap = new HashMap();
hashMap.put(":guard", CommuStubService0.class);
hashMap.put(":banana", CommuStubService1.class);
hashMap.put("com.android.apple", CommuStubService2.class);
hashMap.put(":test4", CommuStubService3.class);
hashMap.put("com.android.test5", CommuStubService4.class);
hashMap.put(":apple", CommuStubService5.class);
hashMap.put(":tea", CommuStubService6.class);
hashMap.put("com.android.test6", CommuStubService7.class);
hashMap.put(":test3", CommuStubService8.class);
hashMap.put(":test2", CommuStubService9.class);
hashMap.put(":test1", CommuStubService10.class);
return hashMap.get(proName) != null ? hashMap.get(proName) : null;
}

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

No branches or pull requests

1 participant