View Javadoc
1   /*******************************************************************************
2    * Portions created by Sebastian Thomschke are copyright (c) 2005-2011 Sebastian
3    * Thomschke.
4    * 
5    * All Rights Reserved. This program and the accompanying materials
6    * are made available under the terms of the Eclipse Public License v1.0
7    * which accompanies this distribution, and is available at
8    * http://www.eclipse.org/legal/epl-v10.html
9    * 
10   * Contributors:
11   *     Sebastian Thomschke - initial implementation.
12   *******************************************************************************/
13  package net.sf.oval.ogn;
14  
15  import net.sf.oval.exception.InvalidConfigurationException;
16  
17  /**
18   * @author Sebastian Thomschke
19   */
20  public interface ObjectGraphNavigator
21  {
22  	/**
23  	 * Navigates through the object graph starting at <code>root</code> object.
24  	 * 
25  	 * @param root the root object to start the navigation from
26  	 * @param path the object navigation path relative to the root object. The path format is implementation specific. 
27  	 * @return the result of the navigation operation. <code>null</code> is returned if the target could not be determined, e.g. because of null values in the path.
28  	 * @throws InvalidConfigurationException if the given path is invalid, e.g. because of non-existing fields/properties named in the path.  
29  	 */
30  	ObjectGraphNavigationResult navigateTo(final Object root, final String path) throws InvalidConfigurationException;
31  }