de.caff.util

## Class TextTemplateHandler.WithoutContext

- java.lang.Object
- - de.caff.util.TextTemplateHandler<TextTemplateHandler.WithoutContext>
  - - de.caff.util.TextTemplateHandler.WithoutContext

- Enclosing class:
    TextTemplateHandler<T>

      public static class TextTemplateHandler.WithoutContext
      extends TextTemplateHandler<TextTemplateHandler.WithoutContext>

  Helper class. This allows to use `TextTemplateHandler.Expander` without context.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class de.caff.util.TextTemplateHandler

      `TextTemplateHandler.CtxExpander<T>, TextTemplateHandler.Expander, TextTemplateHandler.WithoutContext`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WithoutContext()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `expand(java.lang.String text)` Expand a string with the given context.
    `void` | `register(java.util.regex.Pattern pattern, TextTemplateHandler.Expander expander)` Register an expander for a regular expression pattern.
    `void` | `register(java.lang.String sequence, TextTemplateHandler.Expander expander)` Register an expander for a simple string pattern.

    - ### Methods inherited from class de.caff.util.TextTemplateHandler

      `expand, register, register, withoutContext`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### WithoutContext

          public WithoutContext()

  - ### Method Detail

    - #### register

          public void register(@NotNull
                               java.util.regex.Pattern pattern,
                               @NotNull
                               TextTemplateHandler.Expander expander)

      Register an expander for a regular expression pattern.
      Parameters:
        `pattern` - pattern to look for
        `expander` - expander to be called if pattern is found

    - #### register

          public void register(@NotNull
                               java.lang.String sequence,
                               @NotNull
                               TextTemplateHandler.Expander expander)

      Register an expander for a simple string pattern.
      Parameters:
        `sequence` - string sequence to look for
        `expander` - expander to be called if sequence is found

    - #### expand

          @NotNull
          public java.lang.String expand(@NotNull
                                                  java.lang.String text)
                                           throws java.io.IOException

      Expand a string with the given context.
      Parameters:
        `text` - text string
      Returns:
        expanded string
      Throws:
        `java.io.IOException` - on expansion errors