2 Replies Latest reply on Nov 27, 2012 10:21 AM by Rick Wagner

    Can we have a 'sensible default' to prevent violation of DRY?

    Rick Wagner Newbie

      Hello SwitchYard developers,


      A user has to type the interface name *twice* when writing a Service.  Would it be possible to have the @Service annotation default to no-args if the class implements only a single interface?  (It seems likely that a Service class might often implement only a single interface.)


      In cases where a class does implement multiple interfaces, we could supply feedback at deployment time and allow the user to choose the right one with an argument (like the current @Service arg).



      public class SimpleServiceBean implements SimpleService {


      would become:



      public class SimpleServiceBean implements SimpleService {


      Would something like that be possible?  It's a small tweak, but would make the user experience better.