作为菜鸟对反射的理解

类对象:所有的类都存在一个类对象,类对象用来描述这种类都有什么属性和方法 获取类对象三种方法: Class cla =Class.forName("com.gh.model.Person"); //com.gh.model 为包名 Person 类名 Class cla1 = Person.class; Class cla2 = new Person().getClass();  //案例中Per
相关文章
相关标签/搜索