Interface MultiLocatable

All Superinterfaces:
All Known Implementing Classes:
BindingException, ConnectionResetException, DuplicateIdException, FormsException, FormsRuntimeException, IncompletenessException, InvalidContinuationException, LibraryException, LibraryException, LocatedException, LocatedRuntimeException, ProcessingException, ResourceNotFoundException

public interface MultiLocatable
extends Locatable

An extension of Location for classes that can hold a list of locations. It will typically be used to build location stacks.

The first location of the collection returned by getLocations() should be be identical to the result of Locatable.getLocation().

If the list of locations designates a call stack, then its first element should be the deepmost location of this stack. This is consistent with the need for getLocation() to return the most precise location.

$Id: MultiLocatable.html 1304258 2012-03-23 10:09:27Z ilgrosso $

Method Summary
 void addLocation(Location location)
          Add a location to the current list of locations.
 List getLocations()
          Return the list of locations.
Methods inherited from interface org.apache.cocoon.util.location.Locatable

Method Detail


List getLocations()
Return the list of locations.

a list of locations, possibly empty but never null.


void addLocation(Location location)
Add a location to the current list of locations.

Implementations are free to filter locations that can be added (e.g. Location.UNKNOWN), and there is therefore no guarantee that the given location will actually be added to the list. Filtered locations are silently ignored.

location - the location to be added.

Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.