Class NestedMethodProperty<T>

    • Constructor Detail

      • NestedMethodProperty

        public NestedMethodProperty​(Object instance,
                                    String propertyName)
        Deprecated.
        Constructs a nested method property for a given object instance. The property name is a dot separated string pointing to a nested property, e.g. "manager.address.street".

        Calling getValue will return null if any intermediate getter returns null

        Parameters:
        instance - top-level bean to which the property applies
        propertyName - dot separated nested property name
        Throws:
        IllegalArgumentException - if the property name is invalid
    • Method Detail

      • getType

        public Class<? extends T> getType()
        Deprecated.
        Description copied from interface: Property
        Returns the type of the Property. The methods getValue and setValue must be compatible with this type: one must be able to safely cast the value returned from getValue to the given type and pass any variable assignable to this type as an argument to setValue.
        Returns:
        type of the Property
      • isReadOnly

        public boolean isReadOnly()
        Deprecated.
        Description copied from class: AbstractProperty
        Tests if the Property is in read-only mode. In read-only mode calls to the method setValue will throw ReadOnlyException and will not modify the value of the Property. Override for additional restrictions on what is considered a read-only property.
        Specified by:
        isReadOnly in interface Property<T>
        Overrides:
        isReadOnly in class AbstractProperty<T>
        Returns:
        true if the Property is in read-only mode, false if it's not
      • getValue

        public T getValue()
        Deprecated.
        Gets the value stored in the Property. The value is resolved by calling the specified getter methods on the current instance:
        Returns:
        the value of the Property
        See Also:
        getInstance()
      • invokeSetMethod

        protected void invokeSetMethod​(T value)
        Deprecated.
        Internal method to actually call the setter method of the wrapped property.
        Parameters:
        value -
      • getGetMethods

        protected List<Method> getGetMethods()
        Deprecated.
        Returns an unmodifiable list of getter methods to call in sequence to get the property value. This API may change in future versions.
        Returns:
        unmodifiable list of getter methods corresponding to each segment of the property name
      • getInstance

        public Object getInstance()
        Deprecated.
        The instance used by this property.
        Returns:
        the instance used for fetching the property value
        Since:
        7.7.7
      • setInstance

        public void setInstance​(Object instance)
        Deprecated.
        Sets the instance used by this property.

        The new instance must be of the same type as the old instance

        To be consistent with setValue(Object), this method will fire a value change event even if the value stays the same

        Parameters:
        instance - the instance to use
        Since:
        7.7.7