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

io.magentys.cinnamon.webdriver.remote.RemoterDetector.scala Maven / Gradle / Ivy

There is a newer version: 0.2.0
Show newest version
package io.magentys.cinnamon.webdriver.remote

import org.reflections.Reflections

import scala.collection.JavaConverters._

object RemoterDetector {

  def getRemoterMatchesURL(url: String): List[CinnamonRemote] = {
    val reflection = new Reflections("io.magentys")
    val classes = reflection.getSubTypesOf(classOf[CinnamonRemote]).asScala.toList

    classes.flatMap(f => {
      val remoter = f.newInstance()

      if (remoter.matchesHubUrl(url))
        Some(remoter)
      else
        None
    })
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy