Method method = clazz.getMethod(methodName, null);我用Class的进行反射!!
就是调用的方法没有参数
所以getMethod的参数中传null,
但是myeclipse有个黄色的警告
怎么让myEclipse忽略这个警告??

解决方案 »

  1.   

    window->preferences->plug-in development
    看看去.我英文不好
      

  2.   

    在方法前面你加上 @SuppressWarnings("unchecked") 就可以了
      

  3.   

    要不你去弄个中文版的eclipse,然后参数一下上边的
      

  4.   

    http://www.programfan.com/blog/article.asp?id=28711
      

  5.   

    直接在黄色的地方选右键菜单preferences,然后在弹出窗口中修改对应警告参数.
      

  6.   

    这个只能去掉一部分(没有加范型什么的)。
    用这个:@SuppressWarnings("all")