|
|
[Java] Resolving fully qualified name?
Hello,is it possible to resolve a class name (method name, type name) tofully qualified name?For example:class Test{ String s = ""; void func1(){ ... }}class Test2{ void func2(){ Test t = new Test(); t.func1(); }}what i need is,class Test{ java.lang.String s = ""; void Test.func1(){ ... }}class Test2{ void Test2.func2(){ Test t = new Test(); Test.func1(); }}Is it possible to do this without byte code analysis?I have seen in Eclipse that if mouseover a function's name, the fullyqualified name of this function will be popped up.Thanks!Regards,Stefan
|
|
0
|
|
|
|
Reply
|
Stefan.Jia (2)
|
3/28/2007 4:09:45 PM |
|
On Mar 28, 6:09 pm, Stefan....@googlemail.com wrote:> is it possible to resolve a class name (method name, type name) to> fully qualified name?Do what the compiler and IDEs do. Look at the package and importstatements and then check the classpath (in case of the compiler alsothe sourcepath) if you can find the class.
|
|
0
|
|
|
|
Reply
|
a24900
|
3/28/2007 6:50:14 PM
|
|
a24900@googlemail.com wrote:> On Mar 28, 6:09 pm, Stefan....@googlemail.com wrote:>> is it possible to resolve a class name (method name, type name) to>> fully qualified name?> > Do what the compiler and IDEs do. Look at the package and import> statements and then check the classpath (in case of the compiler also> the sourcepath) if you can find the class.Which answer lets you know, if you read it carefully, that the compiler will resolve the fully-qualified names for your classes if the import and package statements are correct.-- Lew
|
|
0
|
|
|
|
Reply
|
Lew
|
3/28/2007 11:01:13 PM
|
|
|
2 Replies
109 Views
(page loaded in 0.061 seconds)
|
|
|
|
|
|
|
|
|