org.qi4j.api.composite

## Class PropertyMapper

- java.lang.Object
- - org.qi4j.api.composite.PropertyMapper

-     public final class PropertyMapper
      extends Object

  Transfer java.util.Properties to Composite properties

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `map(InputStream propertyInputStream, Composite composite)` Load a Properties object from the given stream, close it, and then populate the Composite with the properties.
    `static void` | `map(Properties props, Composite composite)` Populate the Composite with properties from the given properties object.
    `static Properties` | `toJavaProperties(Composite composite)` Create Properties object which is backed by the given Composite.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### map

          public static void map(Properties props,
                 Composite composite)
                          throws IllegalArgumentException

      Populate the Composite with properties from the given properties object.
      Parameters:
        `props` - properties object
        `composite` - the composite instance
      Throws:
        `IllegalArgumentException` - if properties could not be transferred to composite

    - #### map

          public static void map(InputStream propertyInputStream,
                 Composite composite)
                          throws IOException

      Load a Properties object from the given stream, close it, and then populate the Composite with the properties.
      Parameters:
        `propertyInputStream` - properties input stream
        `composite` - the instance
      Throws:
        `IOException` - if the stream could not be read

    - #### toJavaProperties

          public static Properties toJavaProperties(Composite composite)

      Create Properties object which is backed by the given Composite.
      Parameters:
        `composite` - the instance
      Returns:
        properties instance