001/* 002 * Copyright 2002-2013 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * https://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.beans; 018 019/** 020 * Simple implementation of the {@link TypeConverter} interface that does not operate on 021 * a specific target object. This is an alternative to using a full-blown BeanWrapperImpl 022 * instance for arbitrary type conversion needs, while using the very same conversion 023 * algorithm (including delegation to {@link java.beans.PropertyEditor} and 024 * {@link org.springframework.core.convert.ConversionService}) underneath. 025 * 026 * <p><b>Note:</b> Due to its reliance on {@link java.beans.PropertyEditor PropertyEditors}, 027 * SimpleTypeConverter is <em>not</em> thread-safe. Use a separate instance for each thread. 028 * 029 * @author Juergen Hoeller 030 * @since 2.0 031 * @see BeanWrapperImpl 032 */ 033public class SimpleTypeConverter extends TypeConverterSupport { 034 035 public SimpleTypeConverter() { 036 this.typeConverterDelegate = new TypeConverterDelegate(this); 037 registerDefaultEditors(); 038 } 039 040}