org.eclipse.viatra.transformation.evm.api

## Class Activation<EventAtom>

- java.lang.Object
- - org.eclipse.viatra.transformation.evm.api.Activation<EventAtom>

- Type Parameters:
    `EventAtom` - the type of the pattern match

      public class Activation<EventAtom>
      extends java.lang.Object

  An `Activation` is a created for a `RuleInstance` when the preconditions (LHS) are fully satisfied with some domain model elements and the instance becomes eligible for execution.

  An Activation holds a state, a pattern match, the corresponding instance 5nstance. The state of the Activation can be either Inactive, Appeared, Disappeared, Upgraded or Fired, while its actual state will be managed by the life-cycle of its instance.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Activation(RuleInstance<EventAtom> instance, EventAtom atom, ActivationState initState)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `void` | `fire(Context context)` The activation will be fired; the appropriate job of the instance will be executed based on the activation state.
    `EventAtom` | `getAtom()`
    `RuleInstance<EventAtom>` | `getInstance()`
    `ActivationState` | `getState()`
    `int` | `hashCode()`
    `boolean` | `isEnabled()` An activatio is enabled, if the there are jobs corresponding to the state of the activation.
    `protected void` | `setState(ActivationState state)` Should be only set through `RuleInstance.activationStateTransition(org.eclipse.viatra.transformation.evm.api.Activation<EventAtom>, org.eclipse.viatra.transformation.evm.api.event.EventType)`
    `java.lang.String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Activation

          protected Activation(RuleInstance<EventAtom> instance,
                               EventAtom atom,
                               ActivationState initState)

  - ### Method Detail

    - #### getAtom

          public EventAtom getAtom()

    - #### getState

          public ActivationState getState()

    - #### isEnabled

          public boolean isEnabled()

      An activatio is enabled, if the there are jobs corresponding to the state of the activation.
      Returns:
        true, if there are jobs for the current state

    - #### getInstance

          public RuleInstance<EventAtom> getInstance()

      Returns:
        the instance

    - #### setState

          protected void setState(ActivationState state)

      Should be only set through `RuleInstance.activationStateTransition(org.eclipse.viatra.transformation.evm.api.Activation<EventAtom>, org.eclipse.viatra.transformation.evm.api.event.EventType)`
      Parameters:
        `state` -

    - #### fire

          public void fire(Context context)

      The activation will be fired; the appropriate job of the instance will be executed based on the activation state.

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`