Class PropertyReplacers

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

public class PropertyReplacers extends Object
Provides standard PropertyReplacer implementations.
Author:
John Bailey
  • Constructor Details

    • PropertyReplacers

      public PropertyReplacers()
  • Method Details

    • noop

      public static PropertyReplacer noop()
      Return a replacer that functions as a no-op.
      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