JBoss Metadata Common 7.2.2.Final

org.jboss.metadata.property
Class PropertyReplacers

java.lang.Object
  extended by org.jboss.metadata.property.PropertyReplacers

public class PropertyReplacers
extends Object

Provides standard PropertyReplacer implementations.

Author:
John Bailey

Constructor Summary
PropertyReplacers()
           
 
Method Summary
static PropertyReplacer noop()
          Return a replacer that functions as a no-op.
static PropertyReplacer resolvingExpressionReplacer(SimpleExpressionResolver resolver)
          Return a PropertyReplacer that uses the provided SimpleExpressionResolver to resolve any expressions found in the text.
static PropertyReplacer resolvingReplacer(PropertyResolver resolver)
          Deprecated. use resolvingExpressionReplacer(SimpleExpressionResolver)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyReplacers

public PropertyReplacers()
Method Detail

noop

public static PropertyReplacer noop()
Return a replacer that functions as a no-op.

Returns:
the replacer. Will not be null

resolvingReplacer

@Deprecated
public static PropertyReplacer resolvingReplacer(PropertyResolver resolver)
Deprecated. use resolvingExpressionReplacer(SimpleExpressionResolver)

Return a PropertyReplacer that uses the provided PropertyResolver to resolve any properties found in the text. The returned replacer searches for strings beginning with the string "${" and ending with the char '}', and passes the value within to the given resolver. The replacer supports arbitrarily nested expressions, finding the inner-most expressions and resolving those before using the resolved values to compose the outer expressions. The replacer also supports recursive resolution, so if a resolved value is itself in the form of an expression, that expression will in turn be resolved.

Parameters:
resolver - the resolver used for any properties being replaced. Cannot be null
Returns:
the replacer. Will not be null

resolvingExpressionReplacer

public static PropertyReplacer resolvingExpressionReplacer(SimpleExpressionResolver resolver)
Return a PropertyReplacer that uses the provided SimpleExpressionResolver to resolve any expressions found in the text. The returned replacer searches for strings beginning with the string "${" and ending with the char '}', and passes the value within to the given resolver. The replacer supports arbitrarily nested expressions, finding the inner-most expressions and resolving those before using the resolved values to compose the outer expressions. The replacer also supports recursive resolution, so if a resolved value is itself in the form of an expression, that expression will in turn be resolved.

Parameters:
resolver - The resolver used for any expressions being replaced. Cannot be null
Returns:
the replacer. Will not be null

JBoss Metadata Common 7.2.2.Final

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.