* Copyright 2004-2008 the original author or authors.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
Implementations of this interface are thread-safe and can be shared.
A converter is more generic than a formatter. A formatter only handles converting from String and back, while converters convert from an arbitrary Object type to another.
sourcethe source object to convert, its class must be one of the supported
targetClassthe target class to convert the source to, it must be one of the supported
contextan optional conversion context that may be used to influence the conversion process
ConversionExceptionan exception occurred during the type conversion