ConstBinder.java 文件源码

java
阅读 36 收藏 0 点赞 0 评论 0

项目:turbine 作者:
private static ImmutableSet<ElementType> bindTarget(AnnoInfo annotation) {
  ImmutableSet.Builder<ElementType> result = ImmutableSet.builder();
  Const val = annotation.values().get("value");
  switch (val.kind()) {
    case ARRAY:
      for (Const element : ((ArrayInitValue) val).elements()) {
        if (element.kind() == Kind.ENUM_CONSTANT) {
          bindTargetElement(result, (EnumConstantValue) element);
        }
      }
      break;
    case ENUM_CONSTANT:
      bindTargetElement(result, (EnumConstantValue) val);
      break;
    default:
      break;
  }
  return result.build();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号