ModeShape Distribution 3.0.0.Beta4

org.infinispan.schematic.internal.document
Class JsonReader.SimpleValueMatcher

java.lang.Object
  extended by org.infinispan.schematic.internal.document.JsonReader.SimpleValueMatcher
All Implemented Interfaces:
JsonReader.ValueMatcher
Direct Known Subclasses:
JsonReader.DateValueMatcher
Enclosing class:
JsonReader

@NotThreadSafe
public static class JsonReader.SimpleValueMatcher
extends Object
implements JsonReader.ValueMatcher

The component that matches a string value for certain patterns. If the value matches a known pattern, it return the appropriate value object; otherwise, the supplied string value is returned.

Since:
5.1

Field Summary
protected  DocumentValueFactory values
           
 
Constructor Summary
JsonReader.SimpleValueMatcher(DocumentValueFactory values)
          Create a new matcher that uses the supplied DocumentValueFactory instance.
 
Method Summary
 Object parseValue(String value)
          Parse the value given by the supplied string into an appropriate value object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

values

protected final DocumentValueFactory values
Constructor Detail

JsonReader.SimpleValueMatcher

public JsonReader.SimpleValueMatcher(DocumentValueFactory values)
Create a new matcher that uses the supplied DocumentValueFactory instance.

Parameters:
values - the factory for creating value objects; may not be null
Method Detail

parseValue

public Object parseValue(String value)
Parse the value given by the supplied string into an appropriate value object. This method looks for specific patterns of Date strings; if no known pattern is found, it just returns the supplied value.

Specified by:
parseValue in interface JsonReader.ValueMatcher
Parameters:
value - the string representation of the value
Returns:
the value

ModeShape Distribution 3.0.0.Beta4

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.