@Value.Lazy
List<TypeElement> builderIncludedTypes() {
Optional<FIncludeMirror> includes = builderInclude();
ImmutableList<TypeMirror> typeMirrors = includes.isPresent()
? ImmutableList.copyOf(includes.get().valueMirror())
: ImmutableList.<TypeMirror>of();
FluentIterable<TypeElement> typeElements = FluentIterable.from(typeMirrors)
.filter(DeclaredType.class)
.transform(DeclatedTypeToElement.FUNCTION);
ImmutableSet<String> uniqueTypeNames = typeElements
.filter(IsPublic.PREDICATE)
.transform(ElementToName.FUNCTION)
.toSet();
if (uniqueTypeNames.size() != typeMirrors.size()) {
report().annotationNamed(IncludeMirror.simpleName())
.warning("Some types were ignored, non-supported for inclusion: duplicates,"
+ " non declared reference types, non-public");
}
return typeElements.toList();
}
Proto.java 文件源码
java
阅读 36
收藏 0
点赞 0
评论 0
项目:GitHub
作者:
评论列表
文章目录