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 booleanhasValue(Tree tree, String expectedValue)static IntegerintLiteralValue(ExpressionTree expression)static booleanis0xff(ExpressionTree expression)static booleanisEmptyString(Tree tree)static booleanisFalse(Tree tree)static booleanisNegOne(ExpressionTree tree)static booleanisOne(ExpressionTree tree)static booleanisTextBlock(String value)static booleanisTrue(Tree tree)static booleanisZero(ExpressionTree tree)static LonglongLiteralValue(ExpressionTree tree)static StringtrimLongSuffix(String longString)static StringtrimQuotes(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)
-
-