[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. Advertisements

  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. Advertisements

  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. Advertisements

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. Jacob Crossley
    Replies:
    0
    Views:
    544
    Jacob Crossley
    Apr 2, 2004
  2. Jacob Crossley
    Replies:
    0
    Views:
    493
    Jacob Crossley
    Apr 6, 2004
  3. S.Marion
    Replies:
    2
    Views:
    617
    Roedy Green
    Mar 3, 2006
  4. Jim Garrison
    Replies:
    4
    Views:
    2,167
    Peter Flynn
    Oct 27, 2005
  5. Alexander Grigoriev
    Replies:
    0
    Views:
    501
    Alexander Grigoriev
    Sep 12, 2003
  6. Jim Wallace
    Replies:
    1
    Views:
    424
    Kamilche
    Feb 14, 2005
  7. patrimith
    Replies:
    2
    Views:
    1,252
    Goldfish
    Oct 11, 2007
  8. Szabolcs Borsanyi

    Pointer to qualified poitner to qualified object

    Szabolcs Borsanyi, May 30, 2008, in forum: C Programming
    Replies:
    13
    Views:
    831
    Keith Thompson
    Jun 8, 2008
Loading...