Package org.sonar.java.checks.helpers
Class JavaPropertiesHelper
- java.lang.Object
-
- org.sonar.java.checks.helpers.JavaPropertiesHelper
-
public class JavaPropertiesHelper extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ExpressionTreeretrievedPropertyDefaultValue(ExpressionTree expression)If the provided expression is anIdentifierTreeor aMethodInvocationTree, it will check if it used to retrieve a property with a default value provided (usingProperties.getProperty(String, String)).
-
-
-
Method Detail
-
retrievedPropertyDefaultValue
@CheckForNull public static ExpressionTree retrievedPropertyDefaultValue(ExpressionTree expression)
If the provided expression is anIdentifierTreeor aMethodInvocationTree, it will check if it used to retrieve a property with a default value provided (usingProperties.getProperty(String, String)).- Parameters:
expression-- Returns:
- null The default value of the getProperty method invocation, or null if the expression is not of the expected kind or if is not used to retrieve a property with a default value. .
-
-