com.taco.text
Class InterpolatedValueMatchResult

java.lang.Object
  extended by com.taco.text.MatchResult
      extended by com.taco.text.InterpolatedValueMatchResult
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class InterpolatedValueMatchResult
extends MatchResult
implements java.lang.Cloneable, java.io.Serializable

A data structure used to hold the information about an interpolated value found in a CharSequence.

See Also:
Serialized Form

Field Summary
 java.lang.String argMapFallbackString
          A string to convert in case the argument map did not contain the desired key.
 java.lang.String argMapKey
          The name of the argument map key that this value references.
 java.lang.String assignedGlobalName
          The name of the global variable the string literal is to be assigned to.
 java.lang.String bundleKey
          The name of the resource bundle key that this value references.
 java.lang.String fromMapValueConverterString
          The string that represents the converter from the argument map value to the value actually used.
 java.lang.String literal
          The string literal used to represent the value.
 boolean readArgMap
          True if the value from the argument map should be used for a value.
 java.lang.String referencedGlobalName
          The name of the global variable this value references.
 java.lang.String toMapValueConverterString
          The string that represents the converter from the value actually used to the argument map value.
 boolean updateArgMap
          True if the argument map key should be observed so that later changes to the associated value cause an update in the converted object.
 boolean writeArgMap
          True if changes to a property of a composite object should be reflected in the argument map.
 
Fields inherited from class com.taco.text.MatchResult
endIndex, s, startIndex
 
Constructor Summary
InterpolatedValueMatchResult()
           
 
Method Summary
 boolean removeBraces(char braceChar)
          If this instance represents a literal, try to remove the opening and closing braces from it, and adjust literal and s accordingly.
 void reset()
          Reset all fields to their default state.
 java.lang.String toString()
           
 
Methods inherited from class com.taco.text.MatchResult
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bundleKey

public java.lang.String bundleKey
The name of the resource bundle key that this value references. By default, this is null.


argMapKey

public java.lang.String argMapKey
The name of the argument map key that this value references. By default, this is null.


fromMapValueConverterString

public java.lang.String fromMapValueConverterString
The string that represents the converter from the argument map value to the value actually used. By default, this is null.


toMapValueConverterString

public java.lang.String toMapValueConverterString
The string that represents the converter from the value actually used to the argument map value. By default, this is null.


readArgMap

public boolean readArgMap
True if the value from the argument map should be used for a value. By default, this is true.


updateArgMap

public boolean updateArgMap
True if the argument map key should be observed so that later changes to the associated value cause an update in the converted object. By default, this is true.


writeArgMap

public boolean writeArgMap
True if changes to a property of a composite object should be reflected in the argument map. This requires that a map consistency listener be added to a composite object. By default, this is false.


argMapFallbackString

public java.lang.String argMapFallbackString
A string to convert in case the argument map did not contain the desired key. By default, this is null.


referencedGlobalName

public java.lang.String referencedGlobalName
The name of the global variable this value references. By default, this is null.


assignedGlobalName

public java.lang.String assignedGlobalName
The name of the global variable the string literal is to be assigned to. By default, this is null.


literal

public java.lang.String literal
The string literal used to represent the value. By default, this is null.

Constructor Detail

InterpolatedValueMatchResult

public InterpolatedValueMatchResult()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class MatchResult

reset

public void reset()
Reset all fields to their default state.

Overrides:
reset in class MatchResult

removeBraces

public boolean removeBraces(char braceChar)
If this instance represents a literal, try to remove the opening and closing braces from it, and adjust literal and s accordingly. Return true if successful. If this instance represents a variable reference, or braces do not appear in the literal, return false.