Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
该org.junit包定义了Assert用于 JUnit 测试的类。如何JClass在CodeModel框架中检索这个静态类?
org.junit
Assert
JClass
CodeModel
我想我找到了:
import com.sun.codemodel.JCodeModel; import org.junit.Assert; ... JCodeModel jcm = new JCodeModel(); assertClass = jcm.ref(Assert.class);