@ProviderType
public class IntersectionTypes
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.reflect.Type[] |
getTypes(java.lang.reflect.Type type) |
static java.lang.reflect.Type |
intersectionOf(java.util.Collection<? extends java.lang.reflect.Type> types) |
static java.lang.reflect.Type |
intersectionOf(java.util.Collection<? extends java.lang.reflect.Type> types,
BoundSet bounds)
Create an intersection type from the given types, with leniency towards
validation of intersections between types which may contain inference
variables according to the given bound set.
|
static java.lang.reflect.Type |
intersectionOf(java.lang.reflect.Type... types) |
static IntersectionType |
proxy(java.util.function.Supplier<IntersectionType> source) |
static java.lang.String |
toString(IntersectionType type,
Imports imports)
Give a canonical String representation of an intersection type which supports
infinite types.
|
static java.lang.String |
toString(IntersectionType type,
Imports imports,
Isomorphism isomorphism)
Give a canonical String representation of an intersection type which supports
infinite types.
|
public static IntersectionType proxy(java.util.function.Supplier<IntersectionType> source)
source
- A supplier of the intersection type we wish to proxy.public static java.lang.reflect.Type intersectionOf(java.lang.reflect.Type... types)
types
- The set of types from which to derive a new intersection type.public static java.lang.reflect.Type intersectionOf(java.util.Collection<? extends java.lang.reflect.Type> types)
types
- The set of types from which to derive a new intersection type.public static java.lang.reflect.Type intersectionOf(java.util.Collection<? extends java.lang.reflect.Type> types, BoundSet bounds)
types
- The set of types from which to derive a new intersection type.bounds
- The bound set which provides context for any inference variables
which may be mentioned by the given types.public static java.lang.String toString(IntersectionType type, Imports imports)
type
- the type to printimports
- classes and packages for which full package qualification may be
omitted from outputpublic static java.lang.String toString(IntersectionType type, Imports imports, Isomorphism isomorphism)
type
- the type to printimports
- classes and packages for which full package qualification may be
omitted from outputisomorphism
- a type to string isomorphic mapping to deal with recursionpublic static java.lang.reflect.Type[] getTypes(java.lang.reflect.Type type)