Class TypeUtilities
- java.lang.Object
-
- com.strobel.decompiler.languages.java.utilities.TypeUtilities
-
public final class TypeUtilities extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static int
BOOL_RANK
private static java.util.Map<java.lang.Class,TypeDefinition>
BOXED_PRIMITIVES_BY_CLASS
private static int
BYTE_RANK
private static int
CHAR_RANK
private static int
DOUBLE_RANK
private static int
FLOAT_RANK
private static int
INT_RANK
private static int
LONG_RANK
private static int
MAX_NUMERIC_RANK
private static java.lang.String
OBJECT_DESCRIPTOR
private static int
SHORT_RANK
private static java.lang.String
STRING_DESCRIPTOR
private static int
STRING_RANK
private static java.util.Map<JvmType,java.lang.Integer>
TYPE_TO_RANK_MAP
-
Constructor Summary
Constructors Constructor Description TypeUtilities()
-
Method Summary
-
-
-
Field Detail
-
OBJECT_DESCRIPTOR
private static final java.lang.String OBJECT_DESCRIPTOR
- See Also:
- Constant Field Values
-
STRING_DESCRIPTOR
private static final java.lang.String STRING_DESCRIPTOR
- See Also:
- Constant Field Values
-
TYPE_TO_RANK_MAP
private static final java.util.Map<JvmType,java.lang.Integer> TYPE_TO_RANK_MAP
-
BOXED_PRIMITIVES_BY_CLASS
private static final java.util.Map<java.lang.Class,TypeDefinition> BOXED_PRIMITIVES_BY_CLASS
-
BYTE_RANK
private static final int BYTE_RANK
- See Also:
- Constant Field Values
-
SHORT_RANK
private static final int SHORT_RANK
- See Also:
- Constant Field Values
-
CHAR_RANK
private static final int CHAR_RANK
- See Also:
- Constant Field Values
-
INT_RANK
private static final int INT_RANK
- See Also:
- Constant Field Values
-
LONG_RANK
private static final int LONG_RANK
- See Also:
- Constant Field Values
-
FLOAT_RANK
private static final int FLOAT_RANK
- See Also:
- Constant Field Values
-
DOUBLE_RANK
private static final int DOUBLE_RANK
- See Also:
- Constant Field Values
-
BOOL_RANK
private static final int BOOL_RANK
- See Also:
- Constant Field Values
-
STRING_RANK
private static final int STRING_RANK
- See Also:
- Constant Field Values
-
MAX_NUMERIC_RANK
private static final int MAX_NUMERIC_RANK
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTypeRank
private static int getTypeRank(@NotNull TypeReference type)
-
isPrimitive
public static boolean isPrimitive(@Nullable TypeReference type)
-
isPrimitiveOrWrapper
public static boolean isPrimitiveOrWrapper(@Nullable TypeReference type)
-
isBoolean
public static boolean isBoolean(@Nullable TypeReference type)
-
isArithmetic
public static boolean isArithmetic(@Nullable TypeReference type)
-
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)
-
skipParenthesesDown
@Nullable public static Expression skipParenthesesDown(Expression e)
-
checkSameExpression
private static boolean checkSameExpression(Expression template, Expression expression)
-
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
public static IMethodSignature getLambdaSignature(MethodGroupExpression node)
-
getLambdaSignature
public static IMethodSignature getLambdaSignature(LambdaExpression node)
-
isValidPrimitiveLiteralAssignment
public static boolean isValidPrimitiveLiteralAssignment(TypeReference targetType, java.lang.Object value)
-
getLambdaSignatureCore
private static IMethodSignature getLambdaSignatureCore(Expression node)
-
-