reflect机制的问题,有兴趣者请进
package javapack.util;
import java.lang.reflect.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
class testref {
public void testref(){System.out.println( "testref() ");}
public void testref(String s){System.out.println( "testref(String) ");}
public void testref(int i, double d){System.out.println( "testref(int,double) ");}
public void testref(String s , double d){System.out.println( "testref(String,double) ");}
public void testref(String s , long l){System.out.println( "testref(String,long) ");}
public void test1(){System.out.println( "testref: test1() ");}
public void test2(){System.out.println( "testref: test2() ");}
public void test3(){System.out.println( "testref: test3() ");}
public void test4(){System.out.println( "testref: test4() ");}
public void test5(){System.out.println( "testref: test5() ");}
public void test6(){System.out.println( "testref: test6() ");}
}
public class testclass {
public static void main(String[] args){
try{
Class cc = testref.class ;
System.out.println( "this class : "+cc.toString());
// Method[] m = cc.getMethods();
// for(int i=0 ; i < m.length ; i++)
// { System.out.println( "Method[ "+i+ "]: "+m[i].toString());
// }
// Constructor[] ctr = cc.getConstructors();
// for(int i=0 ; i < ctr.length ; i++)
// { System.out.println( "Constructor[ "+i+ "]: "+ctr[i].toString());
// }