我只知道获得所有方法名Class c = Class.forName("class_name");c.getConstructors();
c.getFields()
c.getMethods();

解决方案 »

  1.   

    我知道楼主想作甚么,却不知道怎么做
    如果想获得当然线程可以:Thread.currentThread();
    搂住就是想获得正在执行的方法的名称:void Method()
    {
      //这里获得方法名:"Method"
    }
      

  2.   

    在JDK1.4中可以很方便的获得
    new Exception().getStackTrace()[i].getMethodName();//其中i = 0就是当前的类的方法名字i == 1就是调用者的方法
      

  3.   

    厉害哦,一下字就搞定了,upup