Class LiteralFolding
java.lang.Object
org.benf.cfr.reader.bytecode.analysis.parse.literal.LiteralFolding
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Double
computeLiteral
(double l, double r, ArithOp op) private static Double
computeLiteral
(double l, ArithOp op) private static Float
computeLiteral
(float l, float r, ArithOp op) private static Float
computeLiteral
(float l, ArithOp op) private static Integer
computeLiteral
(int l, int r, ArithOp op) private static Integer
computeLiteral
(int l, ArithOp op) private static Long
computeLiteral
(long l, long r, ArithOp op) private static Long
computeLiteral
(long l, ArithOp op) private static TypedLiteral
computeLiteral
(RawJavaType type, TypedLiteral l, ArithOp op) private static TypedLiteral
computeLiteral
(RawJavaType type, TypedLiteral l, TypedLiteral r, ArithOp op) static Literal
foldArithmetic
(RawJavaType returnType, Literal l, ArithOp op) static Literal
foldArithmetic
(RawJavaType returnType, Literal l, Literal r, ArithOp op) Fold an arithmetic operations.static Literal
foldCast
(Literal val, RawJavaType returnType) private static TypedLiteral
getCast
(TypedLiteral val, RawJavaType fromType, RawJavaType returnType) private static RawJavaType
-
Constructor Details
-
LiteralFolding
public LiteralFolding()
-
-
Method Details
-
foldArithmetic
Fold an arithmetic operations. Anything that may fail at runtime must return null. -
computeLiteral
private static TypedLiteral computeLiteral(RawJavaType type, TypedLiteral l, TypedLiteral r, ArithOp op) -
computeLiteral
-
computeLiteral
-
computeLiteral
-
computeLiteral
-
foldArithmetic
-
computeLiteral
-
computeLiteral
-
computeLiteral
-
computeLiteral
-
computeLiteral
-
foldCast
-
getCast
-
getRawType
-