Class MethodBoundPropertyListener

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.beans.PropertyDescriptor descriptor
      Property descriptor
      protected java.lang.Object instance
      Instance object that contains setter method
      protected java.lang.String propertyName
      Property name which we are bound to
      protected java.lang.reflect.Method setter
      Property setter method
    • Constructor Summary

      Constructors 
      Constructor Description
      MethodBoundPropertyListener​(java.lang.Object instance, java.lang.String propertyName)
      Construct a MethodBoundPropertyListener.
      MethodBoundPropertyListener​(java.lang.Object instance, java.lang.String propertyName, java.lang.String beanPropertyName)
      Construct a MethodBoundPropertyListener.
    • Field Detail

      • propertyName

        protected final java.lang.String propertyName
        Property name which we are bound to
      • instance

        protected final java.lang.Object instance
        Instance object that contains setter method
      • setter

        protected final java.lang.reflect.Method setter
        Property setter method
      • descriptor

        protected final java.beans.PropertyDescriptor descriptor
        Property descriptor
    • Constructor Detail

      • MethodBoundPropertyListener

        public MethodBoundPropertyListener​(java.lang.Object instance,
                                           java.lang.String propertyName,
                                           java.lang.String beanPropertyName)
        Construct a MethodBoundPropertyListener.
        Parameters:
        instance - Instance object that contains setter method.
        propertyName - The name of the property which will be bound.
        beanPropertyName - The name of the property setter method.
        Throws:
        PropertyException
      • MethodBoundPropertyListener

        public MethodBoundPropertyListener​(java.lang.Object instance,
                                           java.lang.String propertyName)
        Construct a MethodBoundPropertyListener.
        Parameters:
        instance - Instance object that contains setter method.
        propertyName - The name of the property which will be bound.
    • Method Detail

      • getPropertyDescriptor

        private java.beans.PropertyDescriptor getPropertyDescriptor​(java.lang.String beanPropertyName)
                                                             throws java.beans.IntrospectionException
        Get the PropertyDescriptor for the given bean property name.
        Parameters:
        beanPropertyName - Bean property name.
        Returns:
        PropertyDescriptor.
        Throws:
        java.beans.IntrospectionException
      • getPropertyName

        public final java.lang.String getPropertyName()
        Get the property name which this listener is bound to.
        Returns:
        Property name.
      • invokeSetter

        protected void invokeSetter​(java.lang.String value)
        Coerce and invoke the property setter method on the instance.
        Parameters:
        value - Method value.
        Throws:
        PropertyException - Failed to invoke setter method.