mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-05-03 04:19:47 +01:00
polish
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@1915 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
-1
@@ -40,7 +40,6 @@ public class ConverterNotFoundException extends ConversionException {
|
|||||||
this.targetType = targetType;
|
this.targetType = targetType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the source type that was requested to convert from.
|
* Returns the source type that was requested to convert from.
|
||||||
*/
|
*/
|
||||||
|
|||||||
+3
-7
@@ -42,7 +42,6 @@ public class TypeDescriptor {
|
|||||||
*/
|
*/
|
||||||
public static final TypeDescriptor NULL = new TypeDescriptor();
|
public static final TypeDescriptor NULL = new TypeDescriptor();
|
||||||
|
|
||||||
|
|
||||||
private Class<?> type;
|
private Class<?> type;
|
||||||
|
|
||||||
private MethodParameter methodParameter;
|
private MethodParameter methodParameter;
|
||||||
@@ -51,7 +50,6 @@ public class TypeDescriptor {
|
|||||||
|
|
||||||
private Annotation[] cachedFieldAnnotations;
|
private Annotation[] cachedFieldAnnotations;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new descriptor for the given type.
|
* Create a new descriptor for the given type.
|
||||||
* <p>Use this constructor when a conversion point comes from a source such as a Map
|
* <p>Use this constructor when a conversion point comes from a source such as a Map
|
||||||
@@ -90,7 +88,6 @@ public class TypeDescriptor {
|
|||||||
private TypeDescriptor() {
|
private TypeDescriptor() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the wrapped MethodParameter, if any.
|
* Return the wrapped MethodParameter, if any.
|
||||||
* <p>Note: Either MethodParameter or Field is available.
|
* <p>Note: Either MethodParameter or Field is available.
|
||||||
@@ -132,8 +129,8 @@ public class TypeDescriptor {
|
|||||||
* Determine the declared type of the wrapped parameter/field.
|
* Determine the declared type of the wrapped parameter/field.
|
||||||
* Returns the Object wrapper type if the underlying type is a primitive.
|
* Returns the Object wrapper type if the underlying type is a primitive.
|
||||||
*/
|
*/
|
||||||
public Class getObjectType() {
|
public Class<?> getObjectType() {
|
||||||
Class type = getType();
|
Class<?> type = getType();
|
||||||
return type != null ? ClassUtils.resolvePrimitiveIfNecessary(type) : type;
|
return type != null ? ClassUtils.resolvePrimitiveIfNecessary(type) : type;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,8 +333,7 @@ public class TypeDescriptor {
|
|||||||
* @param type the class
|
* @param type the class
|
||||||
* @return the type descriptor
|
* @return the type descriptor
|
||||||
*/
|
*/
|
||||||
public static TypeDescriptor valueOf(Class type) {
|
public static TypeDescriptor valueOf(Class<?> type) {
|
||||||
// TODO needs a cache for common type descriptors
|
|
||||||
return (type != null ? new TypeDescriptor(type) : NULL);
|
return (type != null ? new TypeDescriptor(type) : NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user