|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.rice.kns.web.format.Formatter
org.kuali.rice.kns.web.format.NoOpStringFormatter
public class NoOpStringFormatter
This class is used to prevent reformatting of String values.
Field Summary |
---|
Fields inherited from class org.kuali.rice.kns.web.format.Formatter |
---|
CREATE_MSG, propertyType, settings |
Constructor Summary | |
---|---|
NoOpStringFormatter()
|
Method Summary | |
---|---|
Object |
convertFromPresentationFormat(Object value)
Returns an object representation of the provided string after first removing any extraneous formatting characters. |
protected Object |
convertToObject(String target)
Does absolutely nothing to the given String. |
Object |
format(Object value)
Does absolutely nothing to the given String. |
Object |
formatArray(Object value)
|
Object |
formatCollection(Collection value)
|
Object |
formatForPresentation(Object value)
begin Kuali Foundation modification Returns a String representation of the given value. |
Object |
formatObject(Object value)
May be overridden by subclasses to provide custom formatting behavior. |
Methods inherited from class org.kuali.rice.kns.web.format.Formatter |
---|
convertToArray, convertToCollection, findFormatter, formatBean, formatNull, formatterForType, getFormatter, getFormatter, getImplementationClass, getNullObjectValue, getPropertyType, getSettings, isBlank, isEmptyValue, isNullValue, isSupportedType, registerFormatter, setPropertyType, setSettings, trimString, unwrapString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NoOpStringFormatter()
Method Detail |
---|
protected Object convertToObject(String target)
convertToObject
in class Formatter
public Object format(Object value)
format
in class Formatter
public Object convertFromPresentationFormat(Object value)
Formatter
Formatter.convertToObject(String)
, which performs the actual conversion.
If the provided object is null
, a blank String
, or a String[]
of length 0
or that has null
or a blank String
in the first position, returns null
.
Otherwise, If the destination property is a Collection
, returns an instance of that type containing the
string values of the array elements.
If the provided object is an array, uses a Formatter corresponding to the array's component type to convert each of its
elements, and returns a new array containing the converted values.
May be overidden by subclasses to customize conversion, though ordinarily Formatter.convertToObject(String)
is a better choice
since it takes advantage of convertFromPresentationFormat
's built-in behavior.
convertFromPresentationFormat
in class Formatter
value
- the string value to be converted
Formatter.convertToObject(String)
public Object formatArray(Object value)
formatArray
in class Formatter
public Object formatCollection(Collection value)
formatCollection
in class Formatter
public Object formatForPresentation(Object value)
Formatter
Formatter.format(Object)
provides a better customization hook.
Provides default handling for properties typed as array or Collection. Subclass implementations of this method must invoke
super.formatForPresentation()
to take advantage of this built-in behavior.
Delegates to callback method formatObject
for all other types. This method in turn invokes the callback method
format
, which serves as an extension point for subclasses; the default implementation simply returns its
argument. Overriding format
allows subclasses to take advantage of all of the array, primitive type, and
Collection handling functionality provided by the base class.
formatForPresentation
in class Formatter
value
- the object to be formatted
end Kuali Foundation modification
public Object formatObject(Object value)
Formatter
Object
).
formatObject
in class Formatter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |