Class ServicePropertySetter


  • public class ServicePropertySetter
    extends java.lang.Object
    This class uses bean utilities to detect the setting of properties on client services. These settings are captured and reapplied whenever client services have to be recreated.
    • Constructor Summary

      Constructors 
      Constructor Description
      ServicePropertySetter​(java.lang.Class<?> clazz)
      Constructs a ServicePropertySetter that can apply settings for class clazz.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void applyProperties​(java.lang.Object target)
      Applies any property settings saved by checkInvocation(Method, Object[]) to the target.
      void checkInvocation​(java.lang.reflect.Method m, java.lang.Object[] args)
      Checks the invocation method m to see if it represents a writable property.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServicePropertySetter

        public ServicePropertySetter​(java.lang.Class<?> clazz)
        Constructs a ServicePropertySetter that can apply settings for class clazz.
        Parameters:
        clazz -
    • Method Detail

      • applyProperties

        public void applyProperties​(java.lang.Object target)
                             throws java.lang.IllegalAccessException,
                                    java.lang.IllegalArgumentException,
                                    java.lang.reflect.InvocationTargetException
        Applies any property settings saved by checkInvocation(Method, Object[]) to the target.
        Parameters:
        target -
        Throws:
        java.lang.IllegalAccessException
        java.lang.IllegalArgumentException
        java.lang.reflect.InvocationTargetException
      • checkInvocation

        public void checkInvocation​(java.lang.reflect.Method m,
                                    java.lang.Object[] args)
        Checks the invocation method m to see if it represents a writable property. If so, a mapping of this property to the args is saved. When applyProperties(Object) is later called, any such saved mappings are applied to the target object in the order setters were called. Only the latest value for a property is saved.
        Parameters:
        m -
        args -