TypevarContext(TypeElement element, String renderedTypeString) {
List<? extends TypeParameterElement> typeParameters = element.getTypeParameters();
if (!typeParameters.isEmpty()) {
this.arguments = SourceTypes.extract(renderedTypeString).getValue();
this.parameters = Lists.newArrayList();
for (TypeParameterElement p : typeParameters) {
parameters.add(p.getSimpleName().toString());
}
// we allow having no arguments in a string as raw type/unspecified argument scenario
Verify.verify(arguments.isEmpty() || (parameters.size() == arguments.size()), parameters + " =/> " + arguments);
} else {
this.parameters = Collections.emptyList();
this.arguments = Collections.emptyList();
}
}
TypeHierarchyCollector.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:GitHub
作者:
评论列表
文章目录