All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ing.baker.recipe.javadsl.Event.scala Maven / Gradle / Ivy

The newest version!
package com.ing.baker.recipe.javadsl

import com.ing.baker.recipe.common

import scala.collection.immutable.Seq

case class Event(val eventClass: Class[_], override val maxFiringLimit: Option[Int]) extends common.Event {
  override val name: String = eventClass.getSimpleName
  override val providedIngredients: Seq[common.Ingredient] =
    eventClass.getDeclaredFields.toIndexedSeq
      .filter(field => !field.isSynthetic)
      .map(f => createIngredient(f.getName, parseType(f.getGenericType, s"Unsupported type for ingredient '${f.getName}' on event '${eventClass.getSimpleName}'")))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy