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

org.scalatra.swagger.reflect.ParameterNameReader.scala Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
package org.scalatra.swagger.reflect

import java.lang.reflect.{ Constructor => JConstructor }
import com.thoughtworks.paranamer.{ BytecodeReadingParanamer, CachingParanamer }

trait ParameterNameReader {
  def lookupParameterNames(constructor: JConstructor[_]): Seq[String]
}

object ParanamerReader extends ParameterNameReader {
  private[this] val paranamer = new CachingParanamer(new BytecodeReadingParanamer)
  def lookupParameterNames(constructor: JConstructor[_]): Seq[String] =
    paranamer.lookupParameterNames(constructor).toIndexedSeq
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy