org.scalatra.swagger.reflect.ParameterNameReader.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalatra-swagger-jakarta_3 Show documentation
Show all versions of scalatra-swagger-jakarta_3 Show documentation
Scalatra integration with Swagger
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