Interface question

Discussion in 'Java' started by Mike Hollis, Apr 6, 2004.

  1. Mike Hollis

    Mike Hollis Guest

    Is there any way to create an interface with an already created object
    with having a ref to the object?


    All interfaces extend a main_interface with the method setUP.

    And each class then implements there own interface and extend the
    main_interface.

    When I call the setUP method for a particular object then using the
    main_interface main.setUP(). I want to make ref to another objects
    inside there.

    Is there anyway for me to just create an interface to another object
    inside this setup function with have to make a Class.newInstence()
    call?

    I tried using reflect and Class.forName("interface name"); but all
    methods come back abstract. Which I think is right but I dunno. Can
    you please help.

    Thanks a lot,

    Michael J. Hollis
     
    Mike Hollis, Apr 6, 2004
    #1
    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. Wildepiet
    Replies:
    0
    Views:
    1,885
    Wildepiet
    Jun 14, 2004
  2. cyberco
    Replies:
    8
    Views:
    511
    cyberco
    Feb 25, 2006
  3. Xah Lee
    Replies:
    15
    Views:
    614
    Sherm Pendley
    Mar 23, 2007
  4. Xah Lee
    Replies:
    15
    Views:
    645
    Sherm Pendley
    Mar 23, 2007
  5. Replies:
    4
    Views:
    361
    timjowers
    Nov 2, 2007
Loading...

Share This Page