public class TypeHelper extends Object
| Constructor and Description |
|---|
TypeHelper() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
areCompatibleThroughWideningPrimitiveConversion(ResolvedType s,
ResolvedType t) |
static boolean |
areCompatibleThroughWideningReferenceConversion(ResolvedType s,
ResolvedType t) |
static MethodType |
getFunctionType(ResolvedType type) |
static ResolvedType |
glb(Set<ResolvedType> types)
See JLS 5.1.10.
|
static Pair<ResolvedType,Boolean> |
groundTargetTypeOfLambda(LambdaExpr lambdaExpr,
ResolvedType T,
TypeSolver typeSolver)
See JLS 15.27.3.
|
static boolean |
isCompatibleInALooseInvocationContext(ResolvedType s,
ResolvedType t)
see https://docs.oracle.com/javase/specs/jls/se8/html/jls-5.html#jls-5.3
|
static boolean |
isCompatibleInALooseInvocationContext(TypeSolver typeSolver,
Expression expression,
ResolvedType t)
see https://docs.oracle.com/javase/specs/jls/se8/html/jls-5.html#jls-5.3
|
static boolean |
isCompatibleInAStrictInvocationContext(Expression expression,
ResolvedType t)
see https://docs.oracle.com/javase/specs/jls/se8/html/jls-5.html#jls-5.3
|
static boolean |
isProperType(ResolvedType type)
The term proper type excludes such "types" that mention inference variables.
|
static ResolvedType |
leastUpperBound(Set<ResolvedType> types)
See JLS 4.10.4.
|
static ResolvedType |
toBoxedType(ResolvedPrimitiveType primitiveType) |
static ResolvedType |
toBoxedType(ResolvedPrimitiveType primitiveType,
TypeSolver typeSolver) |
static Set<InferenceVariable> |
usedInferenceVariables(ResolvedType type) |
public static boolean isProperType(ResolvedType type)
public static boolean isCompatibleInAStrictInvocationContext(Expression expression, ResolvedType t)
expression - t - public static boolean isCompatibleInALooseInvocationContext(TypeSolver typeSolver, Expression expression, ResolvedType t)
expression - t - public static boolean isCompatibleInALooseInvocationContext(ResolvedType s, ResolvedType t)
s - t - public static ResolvedType toBoxedType(ResolvedPrimitiveType primitiveType)
public static ResolvedType toBoxedType(ResolvedPrimitiveType primitiveType, TypeSolver typeSolver)
public static boolean areCompatibleThroughWideningReferenceConversion(ResolvedType s, ResolvedType t)
public static boolean areCompatibleThroughWideningPrimitiveConversion(ResolvedType s, ResolvedType t)
public static Set<InferenceVariable> usedInferenceVariables(ResolvedType type)
public static ResolvedType leastUpperBound(Set<ResolvedType> types)
public static Pair<ResolvedType,Boolean> groundTargetTypeOfLambda(LambdaExpr lambdaExpr, ResolvedType T, TypeSolver typeSolver)
public static MethodType getFunctionType(ResolvedType type)
public static ResolvedType glb(Set<ResolvedType> types)
Copyright © 2007–2024. All rights reserved.