public ParameterizedTypeWrapper substitute(TypeVariable<?> typeVariable, TypeWrapper type) {
TypeWrapper[] newArguments = new TypeWrapper[actualTypeArguments.length];
for (int i = 0; i < newArguments.length; i++) {
TypeWrapper argument = actualTypeArguments[i];
if (argument instanceof TypeVariableTypeWrapper) {
TypeVariableTypeWrapper candidate = (TypeVariableTypeWrapper) argument;
if (candidate.getName().equals(typeVariable.getName())) {
newArguments[i] = type;
continue;
}
}
newArguments[i] = argument;
}
return new ParameterizedTypeWrapper(newArguments, rawType, ownerType);
}
ParameterizedTypeWrapper.java 文件源码
java
阅读 33
收藏 0
点赞 0
评论 0
项目:Reer
作者:
评论列表
文章目录