org.eclipse.viatra.integration.mwe2.mwe2impl.messages

## Class StringMessageFactory

- java.lang.Object
- - org.eclipse.viatra.integration.mwe2.mwe2impl.messages.StringMessageFactory

- All Implemented Interfaces:
    IMessageFactory<java.lang.String,StringMessage>

      public class StringMessageFactory
      extends java.lang.Object
      implements IMessageFactory<java.lang.String,StringMessage>

  Message Factory that is responsible for the creation of StringMessage objects.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StringMessageFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `StringMessage` | `createMessage(java.lang.Object parameter)` Creates a StringMessage using the provided parameter.
    `boolean` | `isValidParameter(java.lang.Object parameter)` Checks if the type of the given parameter matches the parameter type of StringMessage

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

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

- - ### Constructor Detail

    - #### StringMessageFactory

          public StringMessageFactory()

  - ### Method Detail

    - #### createMessage

          public StringMessage createMessage(java.lang.Object parameter)
                                      throws InvalidParameterTypeException

      Creates a StringMessage using the provided parameter. If the parameter is of a wrong type, it throws an InvalidParameterTypeException
      Specified by:
        `createMessage` in interface `IMessageFactory<java.lang.String,StringMessage>`
      Parameters:
        `parameter` - Parameter of the message to be created.
      Returns:
        The created message.
      Throws:
        `InvalidParameterTypeException`

    - #### isValidParameter

          public boolean isValidParameter(java.lang.Object parameter)

      Checks if the type of the given parameter matches the parameter type of StringMessage
      Specified by:
        `isValidParameter` in interface `IMessageFactory<java.lang.String,StringMessage>`
      Parameters:
        `parameter` - Object to be checked.
      Returns:
        Validity of the parameter