[Java] Resolving fully qualified name?

Discussion in 'Java' started by Stefan.Jia@googlemail.com, Mar 28, 2007.

  1. Guest

    Hello,

    is it possible to resolve a class name (method name, type name) to
    fully 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 fully
    qualified name of this function will be popped up.

    Thanks!

    Regards,
    Stefan
    , Mar 28, 2007
    #1
    1. Advertising

  2. Guest

    Re: Resolving fully qualified name?

    On Mar 28, 6:09 pm, 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.
    , Mar 28, 2007
    #2
    1. Advertising

  3. Lew Guest

    Re: Resolving fully qualified name?

    wrote:
    > On Mar 28, 6:09 pm, 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
    Lew, Mar 29, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Frank Drebin

    Re: fully qualified domain name

    Frank Drebin, Aug 26, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    553
    Frank Drebin
    Aug 26, 2003
  2. Jim Garrison
    Replies:
    4
    Views:
    1,830
    Peter Flynn
    Oct 27, 2005
  3. Alexander Grigoriev
    Replies:
    0
    Views:
    369
    Alexander Grigoriev
    Sep 12, 2003
  4. Jim Wallace
    Replies:
    1
    Views:
    314
    Kamilche
    Feb 14, 2005
  5. patrimith
    Replies:
    2
    Views:
    700
    Goldfish
    Oct 11, 2007
Loading...

Share This Page