org.oddjob.arooa
Class PropertyHelper

java.lang.Object
  extended byorg.oddjob.arooa.PropertyHelper
All Implemented Interfaces:
java.io.Serializable

public class PropertyHelper
extends java.lang.Object
implements java.io.Serializable

Used for replacing properties in strings.

Based on an original by Costin Manolache.

See Also:
Serialized Form

Constructor Summary
PropertyHelper(java.lang.String value)
          Default constructor.
 
Method Summary
 java.lang.String getValue()
          Get the original value ${ and all.
 boolean isConstant()
          Is the property constant.
 java.lang.Object replaceProperties(RegistryLookup registry, boolean strictSubstitution)
          Replaces ${xxx} style constructions in the given value with the string value of the corresponding data types.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyHelper

public PropertyHelper(java.lang.String value)
Default constructor.

Method Detail

getValue

public java.lang.String getValue()
Get the original value ${ and all.

Returns:
The original value.

replaceProperties

public java.lang.Object replaceProperties(RegistryLookup registry,
                                          boolean strictSubstitution)
                                   throws ArooaException
Replaces ${xxx} style constructions in the given value with the string value of the corresponding data types.

Returns:
the original string with the properties replaced, or null if the original string is null.
Throws:
ArooaException - if the string contains an opening ${ without a closing }

isConstant

public boolean isConstant()
Is the property constant. i.e. it doesn't contain any ${} type things.

Returns:
True if the property is constant.

toString

public java.lang.String toString()