是的,你可以使用反射.
要上课,请使用
// if your class is in package com.foo and is named Bar
Class<?> klass = Class.forName("com.foo.Bar");
Run Code Online (Sandbox Code Playgroud)
阅读教程以获取更多详细信息.
| 归档时间: |
|
| 查看次数: |
74 次 |
| 最近记录: |