component-installation-plugin / com.intershop.gradle.component.installation.filter / PlaceholderReplacementFilter

PlaceholderReplacementFilter

class PlaceholderReplacementFilter : PatternSet, Transformer<String, String>

PlaceholderReplacement filter reader edits each line of a line. It replaces placeholders with a specified value. The placeholder and replacements are stored in a map. The begin and end tokens for the placeholders can be configured. The default values are "<@" and "@>".

Constructors

<init>

PlaceholderReplacementFilter()

PlaceholderReplacement filter reader edits each line of a line. It replaces placeholders with a specified value. The placeholder and replacements are stored in a map. The begin and end tokens for the placeholders can be configured. The default values are "<@" and "@>".

Properties

beginToken

val beginToken: String

Begin token for placeholders. The default value is "<@".

endToken

val endToken: String

End token for placeholders. The default value is "@>".

placeholders

val placeholders: MutableMap<String, Any>

Map with all placeholder and replacements.

Functions

add

fun add(placeholder: String, replacement: Any): Unit

Adds a key value pair to the placeholders map.

transform

fun transform(inputString: String): String

Transforms the given object, and returns the transformed value.