public final class TypeUtilities
extends java.lang.Object
| Constructor and Description |
|---|
TypeUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static TypeReference |
getExpectedTypeByParent(com.strobel.functions.Function<AstNode,ResolveResult> resolver,
Expression expression) |
static IMethodSignature |
getLambdaSignature(LambdaExpression node) |
static IMethodSignature |
getLambdaSignature(MethodGroupExpression node) |
static boolean |
isArithmetic(TypeReference type) |
static boolean |
isBinaryOperatorApplicable(BinaryOperatorType op,
AstType lType,
AstType rType,
boolean strict) |
static boolean |
isBinaryOperatorApplicable(BinaryOperatorType op,
TypeReference lType,
TypeReference rType,
boolean strict) |
static boolean |
isBoolean(TypeReference type) |
static boolean |
isPrimitive(TypeReference type) |
static boolean |
isPrimitiveOrWrapper(TypeReference type) |
static boolean |
isValidPrimitiveLiteralAssignment(TypeReference targetType,
java.lang.Object value) |
static AstNode |
skipParenthesesDown(AstNode e) |
static Expression |
skipParenthesesDown(Expression e) |
static AstNode |
skipParenthesesUp(AstNode e) |
public static boolean isPrimitive(@Nullable
TypeReference type)
public static boolean isPrimitiveOrWrapper(@Nullable
TypeReference type)
public static boolean isBoolean(@Nullable
TypeReference type)
public static boolean isArithmetic(@Nullable
TypeReference type)
public static boolean isBinaryOperatorApplicable(@NotNull
BinaryOperatorType op,
@NotNull
AstType lType,
@NotNull
AstType rType,
boolean strict)
public static boolean isBinaryOperatorApplicable(@NotNull
BinaryOperatorType op,
@Nullable
TypeReference lType,
@Nullable
TypeReference rType,
boolean strict)
@Nullable public static Expression skipParenthesesDown(Expression e)
@Nullable public static TypeReference getExpectedTypeByParent(com.strobel.functions.Function<AstNode,ResolveResult> resolver, Expression expression)
public static IMethodSignature getLambdaSignature(MethodGroupExpression node)
public static IMethodSignature getLambdaSignature(LambdaExpression node)
public static boolean isValidPrimitiveLiteralAssignment(TypeReference targetType, java.lang.Object value)