Package org.sonar.python.checks.cdk
Class CdkUtils
- java.lang.Object
-
- org.sonar.python.checks.cdk.CdkUtils
-
public class CdkUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static Optional<org.sonar.python.checks.cdk.CdkUtils.ExpressionFlow>getArgument(SubscriptionContext ctx, CallExpression callExpression, String argumentName)Resolve a particular argument of a call or get an empty optional if the argument is not set.static Optional<CallExpression>getCall(Expression expression, String fqn)static Optional<Integer>getInt(Expression expression)static Optional<org.sonar.python.checks.cdk.CdkUtils.ResolvedKeyValuePair>getKeyValuePair(SubscriptionContext ctx, DictionaryLiteralElement element)Resolve the key and value of a dictionary element or get an empty optional if the element is an UnpackingExpression.static Optional<String>getString(Expression expression)
-
-
-
Method Detail
-
getInt
public static Optional<Integer> getInt(Expression expression)
-
getString
public static Optional<String> getString(Expression expression)
-
getCall
public static Optional<CallExpression> getCall(Expression expression, String fqn)
-
getArgument
protected static Optional<org.sonar.python.checks.cdk.CdkUtils.ExpressionFlow> getArgument(SubscriptionContext ctx, CallExpression callExpression, String argumentName)
Resolve a particular argument of a call or get an empty optional if the argument is not set.
-
getKeyValuePair
public static Optional<org.sonar.python.checks.cdk.CdkUtils.ResolvedKeyValuePair> getKeyValuePair(SubscriptionContext ctx, DictionaryLiteralElement element)
Resolve the key and value of a dictionary element or get an empty optional if the element is an UnpackingExpression.
-
-