方法和建设者 [英] methods and construtors

查看:93
本文介绍了方法和建设者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们怎样才能在编译之前从java类中获取方法名称和总结构名称?请任何团体有任何想法与我分享

How can we get methods name and costructors name from java class before compilation?Please any body have any idea plaese share with me

推荐答案

[font = Verdana] [size = 2]问题根本不清楚。你想做什么请详细解释。[/ size] [/ font]
[font=Verdana][size=2]question not clear at all.What are you trying to do please explain in details.[/size][/font]

我们怎样才能得到方法名称和构造函数名称来自编译之前的java类吗?请任何机构有任何想法与我分享
How can we get methods name and costructors name from java class before compilation?Please any body have any idea plaese share with me



如何在编译之前从java类中获取方法名称和协作者名称?请任何团体有任何想法与我共享
How can we get methods name and costructors name from java class before compilation?Please any body have any idea plaese share with me



请用expalin来表达你的意思;编译之前"。

Please expalin what you mean by "before compilation".




我有一个类似test.java的java类


公共类测试{$ / $

boolean packFrame = false;


private int a,b;

公共测试(){



System.out.println(" Hi");

}

public static final void test45(int i){

int a = 0,b = 1;

if(a == b){

System.out.println(" test));

}

System.out.println(" Hi");

}


public static int test123(int i,String s,int k) {



System.out.println(" Hi);

返回5;

}


public void vee(int i){


尝试{

i + = 1;

总和(a,b);

}

catch(例外e){


}

}

public void sum(int a,int b){




try {

int sumab = 0;

sumab = a + b;

} catch(RuntimeException e){


e.printStackTrace();

}

}


我想在编译之前使用这个方法名称和构造函数名称这个java类..


Hi ,
I have one java class like test.java

public class test{


boolean packFrame = false;

private int a,b;
public test() {


System.out.println("Hi");
}
public static final void test45 (int i) {
int a=0,b=1;
if(a==b){
System.out.println("test");
}
System.out.println("Hi");
}

public static int test123 (int i,String s,int k) {


System.out.println("Hi");
return 5;
}

public void vee(int i){

try{
i +=1;
sum( a, b);
}
catch(Exception e){

}
}
public void sum(int a,int b){




try {
int sumab=0;
sumab= a+b;
} catch (RuntimeException e) {

e.printStackTrace();
}
}

I want this methods name and constructors name before compile this java class..



请在编译之前用expalin来表达你的意思。
Please expalin what you mean by "before compilation".


这篇关于方法和建设者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆