Class TypeUtilities
java.lang.Object
com.strobel.decompiler.languages.java.utilities.TypeUtilities
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final Map
<Class, TypeDefinition> private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final String
private static final int
private static final String
private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
checkSameExpression
(Expression template, Expression expression) static TypeReference
getExpectedTypeByParent
(Function<AstNode, ResolveResult> resolver, Expression expression) static IMethodSignature
static IMethodSignature
private static IMethodSignature
private static TypeReference
getType
(Function<AstNode, ResolveResult> resolver, AstNode node) private static int
getTypeRank
(TypeReference type) static boolean
isArithmetic
(TypeReference type) static boolean
isBinaryOperatorApplicable
(BinaryOperatorType op, TypeReference lType, TypeReference rType, TypeReference expectedResultType, boolean strict) static boolean
isBinaryOperatorApplicable
(BinaryOperatorType op, AstType lType, AstType rType, TypeReference expectedResultType, boolean strict) static boolean
isBoolean
(TypeReference type) static boolean
isPrimitive
(TypeReference type) static boolean
static boolean
isValidPrimitiveLiteralAssignment
(TypeReference targetType, Object value) static AstNode
static Expression
static AstNode
-
Field Details
-
OBJECT_DESCRIPTOR
- See Also:
-
STRING_DESCRIPTOR
- See Also:
-
TYPE_TO_RANK_MAP
-
BOXED_PRIMITIVES_BY_CLASS
-
BYTE_RANK
private static final int BYTE_RANK- See Also:
-
SHORT_RANK
private static final int SHORT_RANK- See Also:
-
CHAR_RANK
private static final int CHAR_RANK- See Also:
-
INT_RANK
private static final int INT_RANK- See Also:
-
LONG_RANK
private static final int LONG_RANK- See Also:
-
FLOAT_RANK
private static final int FLOAT_RANK- See Also:
-
DOUBLE_RANK
private static final int DOUBLE_RANK- See Also:
-
BOOL_RANK
private static final int BOOL_RANK- See Also:
-
STRING_RANK
private static final int STRING_RANK- See Also:
-
MAX_NUMERIC_RANK
private static final int MAX_NUMERIC_RANK- See Also:
-
-
Constructor Details
-
TypeUtilities
public TypeUtilities()
-
-
Method Details
-
getTypeRank
-
isPrimitive
-
isPrimitiveOrWrapper
-
isBoolean
-
isArithmetic
-
isBinaryOperatorApplicable
public static boolean isBinaryOperatorApplicable(@NotNull BinaryOperatorType op, @NotNull AstType lType, @NotNull AstType rType, @Nullable TypeReference expectedResultType, boolean strict) -
isBinaryOperatorApplicable
public static boolean isBinaryOperatorApplicable(@NotNull BinaryOperatorType op, @Nullable TypeReference lType, @Nullable TypeReference rType, @Nullable TypeReference expectedResultType, boolean strict) -
skipParenthesesUp
-
skipParenthesesDown
-
skipParenthesesDown
-
checkSameExpression
-
getType
private static TypeReference getType(@NotNull Function<AstNode, ResolveResult> resolver, @NotNull AstNode node) -
getExpectedTypeByParent
@Nullable public static TypeReference getExpectedTypeByParent(Function<AstNode, ResolveResult> resolver, Expression expression) -
getLambdaSignature
-
getLambdaSignature
-
isValidPrimitiveLiteralAssignment
-
getLambdaSignatureCore
-