public abstract class MultiValueRenderer extends ValueRenderer
The rendering algorithm for both is very similar. Common logic is delegated to this class.
The main rendering method essentially delegates to other rendering methods since the actual result is highly dependent on both the varspec modifier and expression type.
| Modifier and Type | Field and Description |
|---|---|
protected static Joiner |
COMMA |
ifEmpty, named| Modifier | Constructor and Description |
|---|---|
protected |
MultiValueRenderer(ExpressionType type) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
render(VariableSpec varspec,
VariableValue value)
Render a value given a varspec and value
|
protected abstract List<String> |
renderNamedExploded(String varname,
VariableValue value)
Rendering method for named expressions and exploded varspecs
|
protected abstract List<String> |
renderNamedNormal(String varname,
VariableValue value)
Rendering method for named expressions and non exploded varspecs
|
protected abstract List<String> |
renderUnnamedExploded(VariableValue value)
Rendering method for non named expressions and exploded varspecs
|
protected abstract List<String> |
renderUnnamedNormal(VariableValue value)
Rendering method for non named expressions and non exploded varspecs
|
pctEncodeprotected static final Joiner COMMA
protected MultiValueRenderer(ExpressionType type)
public final List<String> render(VariableSpec varspec, VariableValue value) throws URITemplateException
ValueRendererrender in class ValueRenderervarspec - the varspecvalue - the matching variable valueURITemplateException - illegal expansionprotected abstract List<String> renderNamedExploded(String varname, VariableValue value)
varname - name of the variable (used in lists)value - value of the variableprotected abstract List<String> renderUnnamedExploded(VariableValue value)
value - value of the variableprotected abstract List<String> renderNamedNormal(String varname, VariableValue value)
varname - name of the variable (used in lists)value - value of the variableprotected abstract List<String> renderUnnamedNormal(VariableValue value)
value - value of the variable