Package com.saxonica.ee.bytecode.util

## Class MessageTemplate

- java.lang.Object
- - com.saxonica.ee.bytecode.util.MessageTemplate

- All Implemented Interfaces:
    `MessageBuilder`

      public class MessageTemplate
      extends java.lang.Object
      implements MessageBuilder

  Helper class to build messages in which the value of run-time bytecode variables can be inserted.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MessageTemplate​(Generator ga, java.lang.String messageTemplate, int param0)` | Create a message template with a single parameter

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `generateErrorMessage()` | Generate code to construct the error message and leave it on the run-time stack

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

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

- - ### Constructor Detail

    - #### MessageTemplate

          public MessageTemplate​(Generator ga,
                                 java.lang.String messageTemplate,
                                 int param0)

      Create a message template with a single parameter
      Parameters:
        `ga` - the Generator
        `messageTemplate` - a message with a placeholder for the dynamic insertion in the form "{$1}"
        `param0` - the slot number on the bytecode stack of the variable whose value is to be inserted into the message; or -1 to indicate that it is to be taken from the top of the bytecode stack

  - ### Method Detail

    - #### generateErrorMessage

          public void generateErrorMessage()

      Description copied from interface: `MessageBuilder`
      Generate code to construct the error message and leave it on the run-time stack
      Specified by:
        `generateErrorMessage` in interface `MessageBuilder`