Class AbstractPropertySource

    • Constructor Detail

      • AbstractPropertySource

        public AbstractPropertySource()
    • Method Detail

      • definePropertyDescriptor

        public void definePropertyDescriptor​(PropertyDescriptor<?> propertyDescriptor)
        Description copied from interface: PropertySource
        Defines a new property. Properties must be defined before they can be set a value.
        Specified by:
        definePropertyDescriptor in interface PropertySource
        Parameters:
        propertyDescriptor - The property descriptor.
      • getPropertySourceType

        protected abstract String getPropertySourceType()
      • getPropertyDescriptor

        public PropertyDescriptor<?> getPropertyDescriptor​(String name)
        Description copied from interface: PropertySource
        Get the PropertyDescriptor for the given property name.
        Specified by:
        getPropertyDescriptor in interface PropertySource
        Parameters:
        name - The name of the property.
        Returns:
        The PropertyDescriptor for the named property, null if there is no such property defined.
      • getProperty

        public <T> T getProperty​(PropertyDescriptor<T> propertyDescriptor)
        Description copied from interface: PropertySource
        Get the typed value for the given property. Multi valued properties return immutable lists.
        Specified by:
        getProperty in interface PropertySource
        Type Parameters:
        T - The underlying type of the property descriptor.
        Parameters:
        propertyDescriptor - The property descriptor.
        Returns:
        The property value.
      • isPropertyOverridden

        public boolean isPropertyOverridden​(PropertyDescriptor<?> propertyDescriptor)
        Description copied from interface: PropertySource
        Returns true if the given property has been set to a value somewhere in the XML.
        Specified by:
        isPropertyOverridden in interface PropertySource
        Parameters:
        propertyDescriptor - The descriptor
        Returns:
        True if the property has been set
      • setProperty

        public <T> void setProperty​(PropertyDescriptor<T> propertyDescriptor,
                                    T value)
        Description copied from interface: PropertySource
        Set the property value specified. This is also referred to as "overriding" the (default) value of a property.
        Specified by:
        setProperty in interface PropertySource
        Type Parameters:
        T - The underlying type of the property descriptor.
        Parameters:
        propertyDescriptor - The property descriptor.
        value - The value to set.
      • getOverriddenPropertiesByPropertyDescriptor

        public final Map<PropertyDescriptor<?>,​Object> getOverriddenPropertiesByPropertyDescriptor()
        Description copied from interface: PropertySource
        Returns a modifiable map of the property descriptors that don't use default values, to their overridden value. Modifications on the returned map don't affect this property source.
        Specified by:
        getOverriddenPropertiesByPropertyDescriptor in interface PropertySource
        Returns:
        The descriptors that don't use default values
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object