com.opensymphony.xwork2.util.location

## Class LocatableProperties

- java.lang.Object
- - java.util.Dictionary<K,V>
  - - java.util.Hashtable<Object,Object>
    - - java.util.Properties
      - - com.opensymphony.xwork2.util.location.LocatableProperties

- All Implemented Interfaces:
    Locatable, Serializable, Cloneable, Map<Object,Object>

      public class LocatableProperties
      extends Properties
      implements Locatable

  Properties implementation that remembers the location of each property. When loaded, a custom properties file parser is used to remember both the line number and preceeding comments for each property entry.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class java.util.Properties

      `defaults`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocatableProperties()`
    `LocatableProperties(Location loc)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Location` | `getLocation()` Get the location of this object
    `Location` | `getPropertyLocation(String key)`
    `void` | `load(InputStream in)`
    `Object` | `setProperty(String key, String value, Object locationObj)`

    - ### Methods inherited from class java.util.Properties

      `getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames`

    - ### Methods inherited from class java.util.Hashtable

      `clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values`

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

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### LocatableProperties

          public LocatableProperties()

    - #### LocatableProperties

          public LocatableProperties(Location loc)

  - ### Method Detail

    - #### load

          public void load(InputStream in)
                    throws IOException

      Overrides:
        `load` in class `Properties`
      Throws:
        `IOException`

    - #### setProperty

          public Object setProperty(String key,
                                    String value,
                                    Object locationObj)

    - #### getPropertyLocation

          public Location getPropertyLocation(String key)

    - #### getLocation

          public Location getLocation()

      Description copied from interface: `Locatable`
      Get the location of this object
      Specified by:
        `getLocation` in interface `Locatable`
      Returns:
        the location

Copyright © 2000–2023 Apache Software Foundation. All rights reserved.