类org.springframework.core.SerializableTypeWrapper.MethodParameterTypeProvider源码实例Demo

下面列出了怎么用org.springframework.core.SerializableTypeWrapper.MethodParameterTypeProvider的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: spring-analysis-note   文件: ResolvableType.java
/**
 * Return a {@link ResolvableType} for the specified {@link MethodParameter} with a
 * given implementation type. Use this variant when the class that declares the method
 * includes generic parameter variables that are satisfied by the implementation type.
 * @param methodParameter the source method parameter (must not be {@code null})
 * @param implementationType the implementation type
 * @return a {@link ResolvableType} for the specified method parameter
 * @see #forMethodParameter(MethodParameter)
 */
public static ResolvableType forMethodParameter(MethodParameter methodParameter,
		@Nullable ResolvableType implementationType) {

	Assert.notNull(methodParameter, "MethodParameter must not be null");
	implementationType = (implementationType != null ? implementationType :
			forType(methodParameter.getContainingClass()));
	ResolvableType owner = implementationType.as(methodParameter.getDeclaringClass());
	return forType(null, new MethodParameterTypeProvider(methodParameter), owner.asVariableResolver()).
			getNested(methodParameter.getNestingLevel(), methodParameter.typeIndexesPerLevel);
}
 
源代码2 项目: spring-analysis-note   文件: ResolvableType.java
/**
 * Resolve the top-level parameter type of the given {@code MethodParameter}.
 * @param methodParameter the method parameter to resolve
 * @since 4.1.9
 * @see MethodParameter#setParameterType
 */
static void resolveMethodParameter(MethodParameter methodParameter) {
	Assert.notNull(methodParameter, "MethodParameter must not be null");
	ResolvableType owner = forType(methodParameter.getContainingClass()).as(methodParameter.getDeclaringClass());
	methodParameter.setParameterType(
			forType(null, new MethodParameterTypeProvider(methodParameter), owner.asVariableResolver()).resolve());
}
 
源代码3 项目: java-technology-stack   文件: ResolvableType.java
/**
 * Return a {@link ResolvableType} for the specified {@link MethodParameter} with a
 * given implementation type. Use this variant when the class that declares the method
 * includes generic parameter variables that are satisfied by the implementation type.
 * @param methodParameter the source method parameter (must not be {@code null})
 * @param implementationType the implementation type
 * @return a {@link ResolvableType} for the specified method parameter
 * @see #forMethodParameter(MethodParameter)
 */
public static ResolvableType forMethodParameter(MethodParameter methodParameter,
		@Nullable ResolvableType implementationType) {

	Assert.notNull(methodParameter, "MethodParameter must not be null");
	implementationType = (implementationType != null ? implementationType :
			forType(methodParameter.getContainingClass()));
	ResolvableType owner = implementationType.as(methodParameter.getDeclaringClass());
	return forType(null, new MethodParameterTypeProvider(methodParameter), owner.asVariableResolver()).
			getNested(methodParameter.getNestingLevel(), methodParameter.typeIndexesPerLevel);
}
 
源代码4 项目: java-technology-stack   文件: ResolvableType.java
/**
 * Resolve the top-level parameter type of the given {@code MethodParameter}.
 * @param methodParameter the method parameter to resolve
 * @since 4.1.9
 * @see MethodParameter#setParameterType
 */
static void resolveMethodParameter(MethodParameter methodParameter) {
	Assert.notNull(methodParameter, "MethodParameter must not be null");
	ResolvableType owner = forType(methodParameter.getContainingClass()).as(methodParameter.getDeclaringClass());
	methodParameter.setParameterType(
			forType(null, new MethodParameterTypeProvider(methodParameter), owner.asVariableResolver()).resolve());
}
 
源代码5 项目: lams   文件: ResolvableType.java
/**
 * Resolve the top-level parameter type of the given {@code MethodParameter}.
 * @param methodParameter the method parameter to resolve
 * @since 4.1.9
 * @see MethodParameter#setParameterType
 */
static void resolveMethodParameter(MethodParameter methodParameter) {
	Assert.notNull(methodParameter, "MethodParameter must not be null");
	ResolvableType owner = forType(methodParameter.getContainingClass()).as(methodParameter.getDeclaringClass());
	methodParameter.setParameterType(
			forType(null, new MethodParameterTypeProvider(methodParameter), owner.asVariableResolver()).resolve());
}
 
源代码6 项目: spring4-understanding   文件: ResolvableType.java
/**
 * Resolve the top-level parameter type of the given {@code MethodParameter}.
 * @param methodParameter the method parameter to resolve
 * @since 4.1.9
 * @see MethodParameter#setParameterType
 */
static void resolveMethodParameter(MethodParameter methodParameter) {
	Assert.notNull(methodParameter, "MethodParameter must not be null");
	ResolvableType owner = forType(methodParameter.getContainingClass()).as(methodParameter.getDeclaringClass());
	methodParameter.setParameterType(
			forType(null, new MethodParameterTypeProvider(methodParameter), owner.asVariableResolver()).resolve());
}
 
源代码7 项目: spring-analysis-note   文件: ResolvableType.java
/**
 * Return a {@link ResolvableType} for the specified {@link MethodParameter},
 * overriding the target type to resolve with a specific given type.
 * @param methodParameter the source method parameter (must not be {@code null})
 * @param targetType the type to resolve (a part of the method parameter's type)
 * @return a {@link ResolvableType} for the specified method parameter
 * @see #forMethodParameter(Method, int)
 */
public static ResolvableType forMethodParameter(MethodParameter methodParameter, @Nullable Type targetType) {
	Assert.notNull(methodParameter, "MethodParameter must not be null");
	ResolvableType owner = forType(methodParameter.getContainingClass()).as(methodParameter.getDeclaringClass());
	return forType(targetType, new MethodParameterTypeProvider(methodParameter), owner.asVariableResolver()).
			getNested(methodParameter.getNestingLevel(), methodParameter.typeIndexesPerLevel);
}
 
源代码8 项目: java-technology-stack   文件: ResolvableType.java
/**
 * Return a {@link ResolvableType} for the specified {@link MethodParameter},
 * overriding the target type to resolve with a specific given type.
 * @param methodParameter the source method parameter (must not be {@code null})
 * @param targetType the type to resolve (a part of the method parameter's type)
 * @return a {@link ResolvableType} for the specified method parameter
 * @see #forMethodParameter(Method, int)
 */
public static ResolvableType forMethodParameter(MethodParameter methodParameter, @Nullable Type targetType) {
	Assert.notNull(methodParameter, "MethodParameter must not be null");
	ResolvableType owner = forType(methodParameter.getContainingClass()).as(methodParameter.getDeclaringClass());
	return forType(targetType, new MethodParameterTypeProvider(methodParameter), owner.asVariableResolver()).
			getNested(methodParameter.getNestingLevel(), methodParameter.typeIndexesPerLevel);
}
 
源代码9 项目: lams   文件: ResolvableType.java
/**
 * Return a {@link ResolvableType} for the specified {@link MethodParameter} with a
 * given implementation type. Use this variant when the class that declares the method
 * includes generic parameter variables that are satisfied by the implementation type.
 * @param methodParameter the source method parameter (must not be {@code null})
 * @param implementationType the implementation type
 * @return a {@link ResolvableType} for the specified method parameter
 * @see #forMethodParameter(MethodParameter)
 */
public static ResolvableType forMethodParameter(MethodParameter methodParameter, ResolvableType implementationType) {
	Assert.notNull(methodParameter, "MethodParameter must not be null");
	implementationType = (implementationType != null ? implementationType :
			forType(methodParameter.getContainingClass()));
	ResolvableType owner = implementationType.as(methodParameter.getDeclaringClass());
	return forType(null, new MethodParameterTypeProvider(methodParameter), owner.asVariableResolver()).
			getNested(methodParameter.getNestingLevel(), methodParameter.typeIndexesPerLevel);
}
 
源代码10 项目: lams   文件: ResolvableType.java
/**
 * Return a {@link ResolvableType} for the specified {@link MethodParameter},
 * overriding the target type to resolve with a specific given type.
 * @param methodParameter the source method parameter (must not be {@code null})
 * @param targetType the type to resolve (a part of the method parameter's type)
 * @return a {@link ResolvableType} for the specified method parameter
 * @see #forMethodParameter(Method, int)
 */
public static ResolvableType forMethodParameter(MethodParameter methodParameter, Type targetType) {
	Assert.notNull(methodParameter, "MethodParameter must not be null");
	ResolvableType owner = forType(methodParameter.getContainingClass()).as(methodParameter.getDeclaringClass());
	return forType(targetType, new MethodParameterTypeProvider(methodParameter), owner.asVariableResolver()).
			getNested(methodParameter.getNestingLevel(), methodParameter.typeIndexesPerLevel);
}
 
源代码11 项目: spring4-understanding   文件: ResolvableType.java
/**
 * Return a {@link ResolvableType} for the specified {@link MethodParameter} with a
 * given implementation type. Use this variant when the class that declares the method
 * includes generic parameter variables that are satisfied by the implementation type.
 * @param methodParameter the source method parameter (must not be {@code null})
 * @param implementationType the implementation type
 * @return a {@link ResolvableType} for the specified method parameter
 * @see #forMethodParameter(MethodParameter)
 */
public static ResolvableType forMethodParameter(MethodParameter methodParameter, ResolvableType implementationType) {
	Assert.notNull(methodParameter, "MethodParameter must not be null");
	implementationType = (implementationType != null ? implementationType :
			forType(methodParameter.getContainingClass()));
	ResolvableType owner = implementationType.as(methodParameter.getDeclaringClass());
	return forType(null, new MethodParameterTypeProvider(methodParameter), owner.asVariableResolver()).
			getNested(methodParameter.getNestingLevel(), methodParameter.typeIndexesPerLevel);
}
 
源代码12 项目: spring4-understanding   文件: ResolvableType.java
/**
 * Return a {@link ResolvableType} for the specified {@link MethodParameter},
 * overriding the target type to resolve with a specific given type.
 * @param methodParameter the source method parameter (must not be {@code null})
 * @param targetType the type to resolve (a part of the method parameter's type)
 * @return a {@link ResolvableType} for the specified method parameter
 * @see #forMethodParameter(Method, int)
 */
public static ResolvableType forMethodParameter(MethodParameter methodParameter, Type targetType) {
	Assert.notNull(methodParameter, "MethodParameter must not be null");
	ResolvableType owner = forType(methodParameter.getContainingClass()).as(methodParameter.getDeclaringClass());
	return forType(targetType, new MethodParameterTypeProvider(methodParameter), owner.asVariableResolver()).
			getNested(methodParameter.getNestingLevel(), methodParameter.typeIndexesPerLevel);
}
 
 类所在包
 类方法
 同包方法