Package org.sonar.java.model
Class LiteralUtils
- java.lang.Object
-
- org.sonar.java.model.LiteralUtils
-
public class LiteralUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
hasValue(Tree tree, String expectedValue)
static Integer
intLiteralValue(ExpressionTree expression)
static boolean
is0xff(ExpressionTree expression)
static boolean
isEmptyString(Tree tree)
static boolean
isFalse(Tree tree)
static boolean
isNegOne(ExpressionTree tree)
static boolean
isOne(ExpressionTree tree)
static boolean
isTextBlock(String value)
static boolean
isTrue(Tree tree)
static boolean
isZero(ExpressionTree tree)
static Long
longLiteralValue(ExpressionTree tree)
static String
trimLongSuffix(String longString)
static String
trimQuotes(String value)
-
-
-
Method Detail
-
intLiteralValue
@CheckForNull public static Integer intLiteralValue(ExpressionTree expression)
-
longLiteralValue
@CheckForNull public static Long longLiteralValue(ExpressionTree tree)
-
isEmptyString
public static boolean isEmptyString(Tree tree)
-
is0xff
public static boolean is0xff(ExpressionTree expression)
-
isTextBlock
public static boolean isTextBlock(String value)
-
isTrue
public static boolean isTrue(Tree tree)
-
isFalse
public static boolean isFalse(Tree tree)
-
isZero
public static boolean isZero(ExpressionTree tree)
-
isOne
public static boolean isOne(ExpressionTree tree)
-
isNegOne
public static boolean isNegOne(ExpressionTree tree)
-
-