Module java.compiler

Interface UnionType

所有超级接口:
AnnotatedConstruct, TypeMirror

public interface UnionType extends TypeMirror
代表一个联合类型。联合类型可以出现为多重捕获异常参数的类型。
参见 Java 语言规范:
14.20 try 语句
自版本:
1.7
  • Method Details

    • getAlternatives

      List<? extends TypeMirror> getAlternatives()
      返回组成此联合类型的备选项。
      返回:
      组成此联合类型的备选项