提交 e6425ee4 编写于 作者: J Juergen Hoeller

polishing

上级 0a17e417
/* /*
* Copyright 2002-2009 the original author or authors. * Copyright 2002-2010 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -268,7 +268,7 @@ public abstract class GenericCollectionTypeResolver { ...@@ -268,7 +268,7 @@ public abstract class GenericCollectionTypeResolver {
* Extract the generic type from the given Type object. * Extract the generic type from the given Type object.
* @param methodParam the method parameter specification * @param methodParam the method parameter specification
* @param type the Type to check * @param type the Type to check
* @param source the source collection/map Class<?> that we check * @param source the source collection/map Class that we check
* @param typeIndex the index of the actual type argument * @param typeIndex the index of the actual type argument
* @param nestingLevel the nesting level of the target type * @param nestingLevel the nesting level of the target type
* @param currentLevel the current nested level * @param currentLevel the current nested level
...@@ -371,20 +371,20 @@ public abstract class GenericCollectionTypeResolver { ...@@ -371,20 +371,20 @@ public abstract class GenericCollectionTypeResolver {
} }
/** /**
* Extract the generic type from the given Class<?> object. * Extract the generic type from the given Class object.
* @param clazz the Class<?> to check * @param clazz the Class to check
* @param source the expected raw source type (can be <code>null</code>) * @param source the expected raw source type (can be <code>null</code>)
* @param typeIndex the index of the actual type argument * @param typeIndex the index of the actual type argument
* @return the generic type as Class, or <code>null</code> if none * @return the generic type as Class, or <code>null</code> if none
*/ */
private static Class<?> extractTypeFromClass(Class clazz, Class<?> source, int typeIndex) { private static Class<?> extractTypeFromClass(Class<?> clazz, Class<?> source, int typeIndex) {
return extractTypeFromClass(null, clazz, source, typeIndex, 1, 1); return extractTypeFromClass(null, clazz, source, typeIndex, 1, 1);
} }
/** /**
* Extract the generic type from the given Class<?> object. * Extract the generic type from the given Class object.
* @param methodParam the method parameter specification * @param methodParam the method parameter specification
* @param clazz the Class<?> to check * @param clazz the Class to check
* @param source the expected raw source type (can be <code>null</code>) * @param source the expected raw source type (can be <code>null</code>)
* @param typeIndex the index of the actual type argument * @param typeIndex the index of the actual type argument
* @param nestingLevel the nesting level of the target type * @param nestingLevel the nesting level of the target type
...@@ -407,7 +407,7 @@ public abstract class GenericCollectionTypeResolver { ...@@ -407,7 +407,7 @@ public abstract class GenericCollectionTypeResolver {
if (ifc instanceof ParameterizedType) { if (ifc instanceof ParameterizedType) {
rawType = ((ParameterizedType) ifc).getRawType(); rawType = ((ParameterizedType) ifc).getRawType();
} }
if (rawType instanceof Class<?> && isIntrospectionCandidate((Class) rawType)) { if (rawType instanceof Class && isIntrospectionCandidate((Class) rawType)) {
return extractType(methodParam, ifc, source, typeIndex, nestingLevel, currentLevel); return extractType(methodParam, ifc, source, typeIndex, nestingLevel, currentLevel);
} }
} }
......
...@@ -183,7 +183,7 @@ public class TypeDescriptor { ...@@ -183,7 +183,7 @@ public class TypeDescriptor {
/** /**
* Determine the declared (non-generic) type of the wrapped parameter/field. * Determine the declared (non-generic) type of the wrapped parameter/field.
* @return the declared type, or null if this is {@link TypeDescriptor#NULL}. * @return the declared type, or <code>null</code> if this is {@link TypeDescriptor#NULL}
*/ */
public Class<?> getType() { public Class<?> getType() {
if (this.type != null) { if (this.type != null) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册