001 /******************************************************************************* 002 * Portions created by Sebastian Thomschke are copyright (c) 2005-2011 Sebastian 003 * Thomschke. 004 * 005 * All Rights Reserved. This program and the accompanying materials 006 * are made available under the terms of the Eclipse Public License v1.0 007 * which accompanies this distribution, and is available at 008 * http://www.eclipse.org/legal/epl-v10.html 009 * 010 * Contributors: 011 * Sebastian Thomschke - initial implementation. 012 *******************************************************************************/ 013 package net.sf.oval.ogn; 014 015 import net.sf.oval.exception.InvalidConfigurationException; 016 017 /** 018 * @author Sebastian Thomschke 019 */ 020 public interface ObjectGraphNavigator 021 { 022 /** 023 * Navigates through the object graph starting at <code>root</code> object. 024 * 025 * @param root the root object to start the navigation from 026 * @param path the object navigation path relative to the root object. The path format is implementation specific. 027 * @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. 028 * @throws InvalidConfigurationException if the given path is invalid, e.g. because of non-existing fields/properties named in the path. 029 */ 030 ObjectGraphNavigationResult navigateTo(final Object root, final String path) throws InvalidConfigurationException; 031 }