org.apache.bval.jsr303.util
Class PathNavigation

java.lang.Object
  extended by org.apache.bval.jsr303.util.PathNavigation

public class PathNavigation
extends Object

Defines a path navigation algorithm and a means of interacting with same.

Version:
$Rev: 1136233 $ $Date: 2011-06-15 17:49:27 -0500 (Wed, 15 Jun 2011) $

Nested Class Summary
static interface PathNavigation.Callback<T>
          Path traversal callback function interface.
static class PathNavigation.CallbackProcedure
          Callback "procedure" that always returns null.
 
Method Summary
static void navigate(CharSequence propertyPath, PathNavigation.Callback<?> callback)
          Navigate a path using the specified callback.
static
<T> T
navigateAndReturn(CharSequence propertyPath, PathNavigation.Callback<? extends T> callback)
          Navigate a path using the specified callback, returning its result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

navigateAndReturn

public static <T> T navigateAndReturn(CharSequence propertyPath,
                                      PathNavigation.Callback<? extends T> callback)
Navigate a path using the specified callback, returning its result.

Type Parameters:
T -
Parameters:
propertyPath - , null is assumed empty/root
callback -
Returns:
T result

navigate

public static void navigate(CharSequence propertyPath,
                            PathNavigation.Callback<?> callback)
Navigate a path using the specified callback.

Parameters:
propertyPath -
callback -


Copyright © 2010-2012 Apache Software Foundation. All Rights Reserved.