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 booleanisTrue(Tree 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)
-
isTrue
public static boolean isTrue(Tree tree)
-
isFalse
public static boolean isFalse(Tree tree)
-
-