|
Gridarta Editor
|
Replaces placeholders in strings. More...
Collaboration diagram for net.sf.gridarta.utils.StringParameterBuilder:Public Member Functions | |
| void | addParameter (@NotNull final String key, @NotNull final String value) |
| Adds a parameter key/value pair. More... | |
| String | replace (@NotNull final CharSequence spec) throws SyntaxErrorException |
| Replaces all parameters in a string. More... | |
Private Attributes | |
| final Map< String, String > | values = new HashMap<>() |
| Maps parameter key to value. More... | |
Static Private Attributes | |
| static final Pattern | PATTERN = Pattern.compile("\\$\\{([a-zA-Z]+)}") |
| The Pattern for parameters. More... | |
Replaces placeholders in strings.
Definition at line 32 of file StringParameterBuilder.java.
| void net.sf.gridarta.utils.StringParameterBuilder.addParameter | ( | @NotNull final String | key, |
| @NotNull final String | value | ||
| ) |
Adds a parameter key/value pair.
The key "PATH" is handled differently: the value is a list of path names to search for the argument. The first match is used; if no match is found, a syntax error occurs.
| key | the parameter's key |
| value | the parameter's value |
Definition at line 53 of file StringParameterBuilder.java.
Referenced by net.sf.gridarta.model.validation.checks.ValidatorFactory< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.createStringArray(), and net.sf.gridarta.model.configsource.AbstractConfigSource.getFile().
Here is the caller graph for this function:| String net.sf.gridarta.utils.StringParameterBuilder.replace | ( | @NotNull final CharSequence | spec | ) | throws SyntaxErrorException |
Replaces all parameters in a string.
| spec | the input string |
| SyntaxErrorException | if a parameter is invalid |
Definition at line 64 of file StringParameterBuilder.java.
Referenced by net.sf.gridarta.model.validation.checks.ValidatorFactory< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.createStringArray(), and net.sf.gridarta.model.configsource.AbstractConfigSource.getFile().
Here is the caller graph for this function:
|
staticprivate |
The Pattern for parameters.
Definition at line 38 of file StringParameterBuilder.java.
|
private |
Maps parameter key to value.
Definition at line 44 of file StringParameterBuilder.java.