例如:
class a{ private String a = "YourName";
private int i = 10;
public String getName(){
return a;
} public int getAge(){
return i;
}
}
如上面的代码,我想知道Java有没有这样的API,能够解析出我的a类,分析出有哪些变量,哪些方法;谢谢!
class a{ private String a = "YourName";
private int i = 10;
public String getName(){
return a;
} public int getAge(){
return i;
}
}
如上面的代码,我想知道Java有没有这样的API,能够解析出我的a类,分析出有哪些变量,哪些方法;谢谢!
Method[] m=a.getMethods();