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

ters.avrohugger-core_2.11.0.10.0.source-code.ClassStore.scala Maven / Gradle / Ivy

There is a newer version: 1.0.0-RC23
Show newest version
package avrohugger

import treehugger.forest._
import treehuggerDSL._
import definitions._
import java.util.concurrent.ConcurrentHashMap
import org.apache.avro.Schema

class ClassStore {

  val generatedClasses: scala.collection.concurrent.Map[Schema, Symbol] = {
  	scala.collection.convert.Wrappers.JConcurrentMapWrapper(new ConcurrentHashMap[Schema, Symbol]())
  }

  def accept(schema: Schema, caseClassDef: Symbol) {
    if (!generatedClasses.contains(schema)) {
      val _ = generatedClasses += schema -> caseClassDef
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy