diff options
author | Olli Virtanen <olli.virtanen@oath.com> | 2018-06-21 16:48:59 +0200 |
---|---|---|
committer | Olli Virtanen <olli.virtanen@oath.com> | 2018-06-21 16:48:59 +0200 |
commit | a9f527be723d026ae21ed9504c55553bd5beadbb (patch) | |
tree | 1323e8bcc5a8f6698618d806f35a70a047cc656e /container-di/src/main/scala/com/yahoo/container/di/Osgi.scala | |
parent | 5258489bf992e8176e136362759ac079494b6f94 (diff) |
Scala code in container-di converted to Java
Diffstat (limited to 'container-di/src/main/scala/com/yahoo/container/di/Osgi.scala')
-rw-r--r-- | container-di/src/main/scala/com/yahoo/container/di/Osgi.scala | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/container-di/src/main/scala/com/yahoo/container/di/Osgi.scala b/container-di/src/main/scala/com/yahoo/container/di/Osgi.scala deleted file mode 100644 index 3407eceae3e..00000000000 --- a/container-di/src/main/scala/com/yahoo/container/di/Osgi.scala +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.container.di - -import com.yahoo.config.FileReference -import com.yahoo.container.bundle.{MockBundle, BundleInstantiationSpecification} -import com.yahoo.container.di.Osgi.BundleClasses -import org.osgi.framework.Bundle -import com.yahoo.component.ComponentSpecification - -/** - * - * @author gjoranv - * @author Tony Vaagenes - */ -trait Osgi { - - def getBundleClasses(bundle: ComponentSpecification, packagesToScan: Set[String]): BundleClasses = { - BundleClasses(new MockBundle, List()) - } - - def useBundles(bundles: java.util.Collection[FileReference]) { - println("useBundles " + bundles.toArray.mkString(", ")) - } - - def resolveClass(spec: BundleInstantiationSpecification): Class[AnyRef] = { - println("resolving class " + spec.classId) - Class.forName(spec.classId.getName).asInstanceOf[Class[AnyRef]] - } - - def getBundle(spec: ComponentSpecification): Bundle = { - println("resolving bundle " + spec) - new MockBundle() - } - -} - -object Osgi { - type RelativePath = String //e.g. "com/yahoo/MyClass.class" - case class BundleClasses(bundle: Bundle, classEntries: Iterable[RelativePath]) -} |