Class Substitution
java.lang.Object
io.clientcore.annotation.processor.models.Substitution
A Substitution is a value that can be used to replace placeholder values in a URL. Placeholders look like:
"http://{host}.com/{fileName}.html", where "{host}" and "{fileName}" are the placeholders.
-
Constructor Summary
ConstructorsConstructorDescriptionSubstitution(String parameterName, String parameterVariableName) Create a new Substitution.Substitution(String parameterName, String parameterVariableName, boolean shouldEncode) Create a new Substitution. -
Method Summary
Modifier and TypeMethodDescriptionGet the placeholder's name.Get the variable name that will be used to replace the placeholder in the target URL.booleanWhether the replacement value from the method argument needs to be encoded when the substitution is taking place.
-
Constructor Details
-
Substitution
Create a new Substitution.- Parameters:
parameterName- The name that is used between curly quotes as a placeholder in the target URL.parameterVariableName- The name of the variable that will be used to replace the placeholder in the target
-
Substitution
Create a new Substitution.- Parameters:
parameterName- The name that is used between curly quotes as a placeholder in the target URL.parameterVariableName- The name of the variable that will be used to replace the placeholder in the targetshouldEncode- Whether the value from the method's argument should be encoded when the substitution is taking place.
-
-
Method Details
-
getParameterName
Get the placeholder's name.- Returns:
- The name of the placeholder.
-
getParameterVariableName
Get the variable name that will be used to replace the placeholder in the target URL.- Returns:
- The name of the variable that will be used to replace the placeholder in the target URL.
-
shouldEncode
public boolean shouldEncode()Whether the replacement value from the method argument needs to be encoded when the substitution is taking place.- Returns:
- Whether the replacement value from the method argument needs to be encoded when the substitution is taking place.
-