diff --git a/org.springframework.core/src/main/java/org/springframework/core/convert/TypeDescriptor.java b/org.springframework.core/src/main/java/org/springframework/core/convert/TypeDescriptor.java index 7cadb734c7..822bfb327f 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/convert/TypeDescriptor.java +++ b/org.springframework.core/src/main/java/org/springframework/core/convert/TypeDescriptor.java @@ -1,3 +1,18 @@ +/* + * Copyright 2004-2009 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ package org.springframework.core.convert; import java.lang.annotation.Annotation; diff --git a/org.springframework.core/src/main/java/org/springframework/core/convert/TypedValue.java b/org.springframework.core/src/main/java/org/springframework/core/convert/TypedValue.java index 3ca258c9c4..16e222ffe8 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/convert/TypedValue.java +++ b/org.springframework.core/src/main/java/org/springframework/core/convert/TypedValue.java @@ -1,3 +1,18 @@ +/* + * Copyright 2004-2009 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ package org.springframework.core.convert; /** diff --git a/org.springframework.core/src/main/java/org/springframework/core/convert/converter/ConverterInfo.java b/org.springframework.core/src/main/java/org/springframework/core/convert/converter/ConverterInfo.java index 24b79daa78..cb33f50dac 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/convert/converter/ConverterInfo.java +++ b/org.springframework.core/src/main/java/org/springframework/core/convert/converter/ConverterInfo.java @@ -1,9 +1,38 @@ +/* + * Copyright 2004-2009 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ package org.springframework.core.convert.converter; +import org.springframework.core.convert.ConversionService; + +/** + * A meta interface a Converter may implement to describe what types he can convert between. + * Implementing this interface is required for converters that do not declare their parameterized types S and T and expect to be registered with a {@link ConversionService}. + * @see Converter + * @see SuperConverter + */ public interface ConverterInfo { + /** + * The source type the converter converts from. + */ public Class getSourceType(); - + + /** + * The target type the converter converts to. + */ public Class getTargetType(); } diff --git a/org.springframework.core/src/main/java/org/springframework/core/convert/converter/SuperTwoWayConverter.java b/org.springframework.core/src/main/java/org/springframework/core/convert/converter/SuperTwoWayConverter.java index 2605da39ba..c7f2f6ab7d 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/convert/converter/SuperTwoWayConverter.java +++ b/org.springframework.core/src/main/java/org/springframework/core/convert/converter/SuperTwoWayConverter.java @@ -1,3 +1,18 @@ +/* + * Copyright 2004-2009 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ package org.springframework.core.convert.converter; import org.springframework.core.convert.ConversionException; @@ -14,10 +29,10 @@ import org.springframework.core.convert.ConversionService; public interface SuperTwoWayConverter extends SuperConverter { /** - * Convert the target of type T to an instance of S. + * Convert the target of type T to an instance of RS. * @param target the target object to convert, whose class must be equal to or a subclass of T * @param sourceClass the requested source class to convert to, which must be equal to S or extend from S - * @return the converted object, which must be an instance of S + * @return the converted object, which must be an instance of RS * @throws Exception an exception occurred performing the conversion; may be any checked exception, the conversion * system will handle wrapping the failure in a {@link ConversionException} that provides a consistent type * conversion error context diff --git a/org.springframework.core/src/main/java/org/springframework/core/convert/service/AbstractCollectionConverter.java b/org.springframework.core/src/main/java/org/springframework/core/convert/service/AbstractCollectionConverter.java index 1f4523f7ee..7029cd3dc6 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/convert/service/AbstractCollectionConverter.java +++ b/org.springframework.core/src/main/java/org/springframework/core/convert/service/AbstractCollectionConverter.java @@ -1,19 +1,18 @@ /* - * Copyright 2002-2009 the original author or authors. - * + * Copyright 2004-2009 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 - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * 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. */ - package org.springframework.core.convert.service; import org.springframework.core.convert.ConversionExecutionException; diff --git a/org.springframework.core/src/main/java/org/springframework/core/convert/service/SuperTwoWayConverterConverter.java b/org.springframework.core/src/main/java/org/springframework/core/convert/service/SuperTwoWayConverterConverter.java index ac1de0b4ba..479d065e26 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/convert/service/SuperTwoWayConverterConverter.java +++ b/org.springframework.core/src/main/java/org/springframework/core/convert/service/SuperTwoWayConverterConverter.java @@ -1,3 +1,18 @@ +/* + * Copyright 2004-2009 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ package org.springframework.core.convert.service; import org.springframework.core.convert.converter.Converter;