Package org.sonar.iac.docker.symbols
Class ArgumentResolution
- java.lang.Object
-
- org.sonar.iac.docker.symbols.ArgumentResolution
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classArgumentResolution.Status
-
Constructor Summary
Constructors Constructor Description ArgumentResolution(Argument argument, String value, ArgumentResolution.Status status)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Argumentargument()booleanisEmpty()booleanisResolved()booleanisUnresolved()static ArgumentResolutionof(Argument argument)Main method of the class, the point of entry to resolveArgumentin order to exploit the result in checks.static ArgumentResolutionofWithoutStrippingQuotes(Argument argument)The method is similar toArgumentResolution#ofbut there is a control of strip quotes or double quotes in string literal.ArgumentResolution.Statusstatus()Stringvalue()
-
-
-
Constructor Detail
-
ArgumentResolution
public ArgumentResolution(@Nullable Argument argument, String value, ArgumentResolution.Status status)
-
-
Method Detail
-
of
public static ArgumentResolution of(@Nullable Argument argument)
Main method of the class, the point of entry to resolveArgumentin order to exploit the result in checks. In docker, most instruction can expect one or even multiple arguments, which can be a mix of strings, quotes string with spaces, variable reference with or without modifier, ect. This method will provide an ArgumentResolution object with the result of the tentative of resolution: the status and the String value. The quotes and double quotes in string literals are striped by default.
-
ofWithoutStrippingQuotes
public static ArgumentResolution ofWithoutStrippingQuotes(@Nullable Argument argument)
The method is similar toArgumentResolution#ofbut there is a control of strip quotes or double quotes in string literal.
-
value
public String value()
-
status
public ArgumentResolution.Status status()
-
argument
public Argument argument()
-
isResolved
public boolean isResolved()
-
isUnresolved
public boolean isUnresolved()
-
isEmpty
public boolean isEmpty()
-
-