## Uses of Interface
javax.lang.model.type.UnionType

- Packages that use UnionType
  Package | Description
  --- | ---
  javax.lang.model.type | Interfaces used to model Java programming language types.
  javax.lang.model.util | Utilities to assist in the processing of program elements and types.

- - ### Uses of UnionType in javax.lang.model.type

    Methods in javax.lang.model.type with parameters of type UnionType
    Modifier and Type | Method | Description
    --- | --- | ---
    `R` | TypeVisitor.`visitUnion(UnionType t, P p)` Visits a union type.

  - ### Uses of UnionType in javax.lang.model.util

    Methods in javax.lang.model.util with parameters of type UnionType
    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract R` | AbstractTypeVisitor7.`visitUnion(UnionType t, P p)` Visits a `UnionType` in a manner defined by a subclass.
    `R` | TypeKindVisitor7.`visitUnion(UnionType t, P p)` This implementation visits a `UnionType` by calling `defaultAction`.
    `R` | SimpleTypeVisitor7.`visitUnion(UnionType t, P p)` This implementation visits a `UnionType` by calling `defaultAction`.
    `R` | AbstractTypeVisitor6.`visitUnion(UnionType t, P p)` Visits a `UnionType` element by calling `visitUnknown`.

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.