Raymond Feng wrote:
The Configurable interface can be optionally implemented by the Invoker implementation classes. To support multiple properties, the invoker can simply do this:

public class MyInvokerImpl implements Invoker, Configurable {
   ...
   <T> public T getProperty(String name) {
       if("AllowsPassByReference".equals(name) {
           return true;
       } else if("AnotherProperty".equals(name) {
           return "StringValue";
       } else {
           return null;
       }
   }
}

This way, the property set is kept at the invoker instances.

I didn't know that generics could do this, with multiple return
types from a single method.  (Seems like I need to go back to
Java school!)  What does the code invoking the magical getProperty()
method look like?

  Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to