Interface ObjectLocator

All Superinterfaces:
Reportable, jakarta.xml.bind.ValidationEventLocator
All Known Subinterfaces:
ItemObjectLocator, PropertyObjectLocator, RootObjectLocator
All Known Implementing Classes:
AbstractObjectLocator, DefaultItemObjectLocator, DefaultPropertyObjectLocator, DefaultRootObjectLocator

public interface ObjectLocator extends jakarta.xml.bind.ValidationEventLocator, Reportable
Object locator denotes a location in an object structure.
Author:
Aleksei Valikov
  • Method Details

    • getParentLocator

      ObjectLocator getParentLocator()
      Returns:
      Parent locator, may be null.
    • getPath

      ObjectLocator[] getPath()
      Returns:
      Path to this locator from the root.
    • getPathAsString

      String getPathAsString()
      Returns:
      Path to this locator in string form;
    • property

      PropertyObjectLocator property(String propertyName, Object propertyValue)
      Creates a locator for the property, relative to this locator.
      Parameters:
      propertyName - name of the property, must not be null.
      propertyValue - value of the property, may be null.
      Returns:
      Child property locator.
    • item

      ItemObjectLocator item(int itemIndex, Object itemValue)
      Creates a locator for the item (like list or array item) relative to this locator.
      Parameters:
      itemIndex - index of the item.
      itemValue - value of the item.
      Returns:
      Child item locator.