org.codehaus.plexus.interpolation
Class PrefixedObjectValueSource

java.lang.Object
  extended by org.codehaus.plexus.interpolation.PrefixedObjectValueSource
All Implemented Interfaces:
FeedbackEnabledValueSource, QueryEnabledValueSource, ValueSource

public class PrefixedObjectValueSource
extends java.lang.Object
implements FeedbackEnabledValueSource, QueryEnabledValueSource

Wraps an arbitrary object with an ObjectBasedValueSource instance, then wraps that source with a PrefixedValueSourceWrapper instance, to which this class delegates all of its calls.

Version:
$Id: PrefixedObjectValueSource.java 7375 2008-06-13 22:16:24Z jdcasey $

Constructor Summary
PrefixedObjectValueSource(java.util.List possiblePrefixes, java.lang.Object root, boolean allowUnprefixedExpressions)
          Wrap the specified root object, allowing the specified list of expression prefixes and setting whether the PrefixedValueSourceWrapper allows unprefixed expressions.
PrefixedObjectValueSource(java.lang.String prefix, java.lang.Object root)
          Wrap the specified root object, allowing the specified expression prefix.
 
Method Summary
 void clearFeedback()
          Clear the feedback accumulated by a prior interpolation run.
 java.util.List getFeedback()
          Return the feedback about resolution failures for a particular expression.
 java.lang.String getLastExpression()
          
 java.lang.Object getValue(java.lang.String expression)
          Delegates to PrefixedValueSourceWrapper.getValue(String) for the instance wrapping the instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrefixedObjectValueSource

public PrefixedObjectValueSource(java.lang.String prefix,
                                 java.lang.Object root)
Wrap the specified root object, allowing the specified expression prefix.


PrefixedObjectValueSource

public PrefixedObjectValueSource(java.util.List possiblePrefixes,
                                 java.lang.Object root,
                                 boolean allowUnprefixedExpressions)
Wrap the specified root object, allowing the specified list of expression prefixes and setting whether the PrefixedValueSourceWrapper allows unprefixed expressions.

Method Detail

getValue

public java.lang.Object getValue(java.lang.String expression)
Delegates to PrefixedValueSourceWrapper.getValue(String) for the instance wrapping the instance.

Specified by:
getValue in interface ValueSource
Returns:
the value related to the expression, or null if not found.

clearFeedback

public void clearFeedback()
Clear the feedback accumulated by a prior interpolation run.

Specified by:
clearFeedback in interface FeedbackEnabledValueSource

getFeedback

public java.util.List getFeedback()
Return the feedback about resolution failures for a particular expression.

Specified by:
getFeedback in interface FeedbackEnabledValueSource
Returns:
a combination of String and Throwable instances, where strings related to throwables are listed first.

getLastExpression

public java.lang.String getLastExpression()

Specified by:
getLastExpression in interface QueryEnabledValueSource
Returns:
the most recent expression processed by this value source, or null.


Copyright © 2001-2010 Codehaus. All Rights Reserved.