The Artima Developer Community
Sponsored Link

Java Answers Forum
Calling Methods by name

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Raja

Posts: 1
Nickname: rag
Registered: Jul, 2002

Calling Methods by name Posted: Jul 22, 2002 6:43 AM
Reply to this message Reply
Advertisement
Is there a way to call methods using reflection
by name

I am now doing it
if (myobject instanceof object1)
object1.method1()
else if (myobject instanceof object2)
object2.method2();
:
:

instead it would be good to do this way

myobject.setProperty(object1, method1);
myboject.setProperty(object2, method2);
Is there a way to do in 1.3

Please help.

Topic: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable Previous Topic   Next Topic Topic: Java Interview Questions

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use