Converter beanutils


















BigDecimal objects. BigInteger objects. Converter implementation that handles conversion to and from Boolean objects. Byte objects. DateTimeConverter implementation that handles conversion to and from java.

Calendar objects. Converter implementaion that handles conversion to and from java. Character objects. Class objects. Provides a facade for Converter implementations preventing access to any public API in the implementation, other than that specified by Converter.

Date objects. Double objects. File objects. Float objects. Integer objects. Long objects. Number objects. Short objects. Time objects. Timestamp objects. Converter implementation that converts an incoming object into a java. String object. URL objects. Construct an array Converter with the specified component Converter that throws a ConversionException if an error occurs.

Construct an array Converter with the specified component Converter that returns a default array of the specified size or null if an error occurs. Construct a converter which delegates to the specified Converter implementation. General purpose locale-sensitive data type converter that can be registered and used within the BeanUtils package to manage the conversion of objects from one type to another.

Standard LocaleConverter implementation that converts an incoming locale-sensitive String into a java. BigDecimal object, optionally using a default value or throwing a ConversionException if a conversion error occurs. BigInteger object, optionally using a default value or throwing a ConversionException if a conversion error occurs.

Byte object, optionally using a default value or throwing a ConversionException if a conversion error occurs. Date object, optionally using a default value or throwing a ConversionException if a conversion error occurs.

The BeanUtils is defined as a utility method for populating JavaBeans properties and ConvertUtils method converts string scalar values to objects, string arrays to arrays of the specified class. The BeanUtils accepts string values by using the setter methods and automatically converts them to suitable property types for Java primitives and uses the getter methods for reverse conversion.

The populate method accepts set of property values from java. HashMap and uses the suitable setters whenever bean contain the property with the same name. The Apache Commons BeanUtils is a library that comes with a number of converters to convert to and from different data types and also contain ConvertUtils utility class which makes use of these converters. The below example shows the conversion of string array to a double array using ConvertUtils utility:. Generic Converter implementation that handles conversion to and from array objects.

NumberConverter implementation that handles conversion to and from java. BigDecimal objects. BigInteger objects. Replaced by the new ArrayConverter implementation. Converter implementation that handles conversion to and from Boolean objects.

Byte objects. DateTimeConverter implementation that handles conversion to and from java. Calendar objects. Converter implementaion that handles conversion to and from java.



0コメント

  • 1000 / 1000