public class PropertyFormatter
extends java.lang.Object
PropertyFormatInfo
metadata.Constructor and Description |
---|
PropertyFormatter(PropertyFormatInfo formatInfo) |
Modifier and Type | Method and Description |
---|---|
ParametersCallback |
format(ParametersCallback parameters)
Creates a
ParametersCallback which formats parameters returned by the original callback. |
java.lang.String |
format(java.lang.String propertyName,
java.lang.Object value)
Formats given object to string.
|
PropertyFormatInfo |
getFormatInfo() |
java.lang.Object |
parse(java.lang.String propertyName,
java.lang.String value)
Parses a string value to an object (if mapping is defined in
PropertyFormatInfo ). |
public PropertyFormatter(PropertyFormatInfo formatInfo)
public java.lang.Object parse(java.lang.String propertyName, java.lang.String value)
PropertyFormatInfo
).propertyName
- name of the propertyvalue
- value to parse.PropertyFormatInfo
), otherwise the unmodified value.public java.lang.String format(java.lang.String propertyName, java.lang.Object value)
propertyName
- name of the property. (Case-sensitive)value
- value to format.public PropertyFormatInfo getFormatInfo()
public ParametersCallback format(ParametersCallback parameters)
ParametersCallback
which formats parameters returned by the original callback.parameters
- parameters callback to use as a sourceParametersCallback
which formats parameters returned by the original callback.Copyright © Copyright 2006-2019 The Scriptella Project Team.