Passthrough configuration methods should probably be reflection-based
---------------------------------------------------------------------

                 Key: KI-81
                 URL: https://issues.apache.org/jira/browse/KI-81
             Project: Ki
          Issue Type: Improvement
          Components: Configuration
    Affects Versions: 0.9-RC1, 0.9
            Reporter: Les Hazlewood
             Fix For: 1.0


We currently have a lot of methods to support passthrough configuration to 
wrapped/delegate objects.  

Most of the time, those passthrough methods are very specific to the underlying 
wrapped implementation - we do a few 'instanceof' checks to see if the 
underlying implementation is one of our default implementations or interfaces, 
and if so, cast the object and then make the call.

Instead, it might be nicer to just use reflection (or PropertyUtils) to take 
the delegate object and reflectively call a setter method, without checking for 
type first.  If the method call fails we could throw a nice message about an 
unexpected type.

This would allow us to get rid of a lot of 'fluff' interfaces that might exist 
solely for passthrough configuration, which only add to bloat and often 
confusion to those perusing the APIs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to