Skip to Content
0
Oct 27, 2008 at 12:06 PM

Component Interface Definition: how to generically reference?

15 Views

Hi

I have component interface definition Worker consisting of some context nodes, method, events and so on.

Several components implement this interface:

  • Developer

  • Fireman

  • Teacher

  • ...

Now I would like to generically reference each interface controller of the above components based on the implemented interface (Worker), something like: IWorkerInterfaceController.

Just as in plain java you can reference class

java.util.Vector

using the implemented interface

java.util.Collection

.

I need this in order to use java.lang.Reflection in an application which handles an unknown number of components all implementing the Worker interface.

any help would be really valued, thanks

Vincenzo