如何使用xx.class中的类呢?
eclipse吧
全部回复
仅看楼主
level 1
silent·木木
楼主
比如某人给我这个Arrtool.class的文件。里面具体什么我不知道,只告诉我里面有这个getindex(int []arr,int key)这个函数的作用。
那我如何用这个MakeArr类调用Arrtool类里面的函数呢?
2017年03月19日 07点03分
1
level 1
要相信科学666
接口?
2017年03月19日 09点03分
2
level 1
要相信科学666
public class Dao<T> implements BaseDao{
private Class<T> entityClass;
private String hql;
@Resource
private SessionFactory sessionFactory;
public Session getSession(){
return sessionFactory.getCurrentSession();
}
@Override
public void add(Object entity){
this.getSession().save(entity);
}
这是我自己写的接口,还有BaseDao也是然后我用public class NewsCategoryDao extends Dao{}继承他,是不是跟这个类似
2017年03月19日 09点03分
3
silent·木木
还有其他简单的办法吗。。这个看不懂
2017年03月19日 13点03分
1