Reflection allows you to do what you want.
J
Thanks for your message at 09:55 PM 6/1/99 -0500, Jason Puyleart:
>Is there a way to have a method work with the specifics of an object at
>runtime?
>
>Let's say that I have a method that I want to pass in a vector of objects
>
>public CheckBoxList(Vector objects, String anObject, String value)
>
>Can I do something like this:
>
>anObject item;
>
>item = (anObject)object.elementAt(index);
>
>item.value
>
>Basically, I want to be able to create a method that will be able to use
>certain methods of an object
>without knowing them until runtime...
>
>This probably doesn't make any sense - it's been a long day.... Any
>thoughts would be appreciated!
John Zukowski Focus on Java Guide / http://java.about.com
[EMAIL PROTECTED] | [EMAIL PROTECTED]
Author Java AWT Reference / Borland's JBuilder No Experience Required
MageLang Institute / Mastering Java 2
http://www.magelang.com Have fun, you'll learn as you go.
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".