org.reactive.beans.factory.config
Interface PlaceholderMatcher

All Known Implementing Classes:
DefaultPlaceholderMatcher

public interface PlaceholderMatcher

Used to determine if the provided value is indeed a placeholder for a configurable value.

Since:
16.12.2004
Version:
$Id: PlaceholderMatcher.java,v 1.2 2004/12/29 11:59:31 dan_washusen Exp $
Author:
Dan Washusen
See Also:
DefaultPlaceholderMatcher

Method Summary
 java.lang.String getProceedingText()
          Returns the proceeding text of the current Placeholder.
 java.lang.String getTrailingText()
          Returns the trailing text of the current Placeholder.
 boolean hasNext()
          Moves to the next placeholder if one is available and returns true, otherwise this method returns false
 void init(java.lang.String value)
          (Re-)Initialise the matcher for a new value.
 boolean isMultiplePlaceholdersPresent()
          A method to determine if the provided value contains multiple placeholders.
 boolean isPlaceholderPresent()
          A method to dermine if the provided key is a placeholder for a configurable value.
 Placeholder next()
          Returns the next placeholder to be evaluated.
 

Method Detail

init

void init(java.lang.String value)
(Re-)Initialise the matcher for a new value.

Parameters:
value - The value that we are now matching

isPlaceholderPresent

boolean isPlaceholderPresent()
A method to dermine if the provided key is a placeholder for a configurable value.

Returns:
true if the key needs to be evaluated, otherwise false

isMultiplePlaceholdersPresent

boolean isMultiplePlaceholdersPresent()
A method to determine if the provided value contains multiple placeholders.

Returns:
true if multiple placeholders are present, otherwise false

next

Placeholder next()
Returns the next placeholder to be evaluated.

Note: much like the iterator class, the hasNext() method must be called before this method.

Returns:
The next Placeholder.

hasNext

boolean hasNext()
Moves to the next placeholder if one is available and returns true, otherwise this method returns false

Returns:
true if another placeholder is available, otherwise false

getProceedingText

java.lang.String getProceedingText()
Returns the proceeding text of the current Placeholder.

e.g. a value of "some proceeding text ${placeholder}" would return "some proceeding next " after the first call to hasNext().

Returns:
The text proceeding the current placeholder, or null if no proceeding text is available

getTrailingText

java.lang.String getTrailingText()
Returns the trailing text of the current Placeholder.

e.g. a value of "some proceeding text ${placeholder} some trailing text" would return " some trailing text" after the first call to hasNext().

Note: the trailing text is also the proceeding text of the next placehodler where there are more placeholders.

Returns:
The text proceeding the current placeholder, or null if no proceeding text is available


Copyright © 2004-2005 reactive.org. All Rights Reserved.