spring-framework / org.springframework.core / LocalVariableTableParameterNameDiscoverer

LocalVariableTableParameterNameDiscoverer

open class LocalVariableTableParameterNameDiscoverer : ParameterNameDiscoverer

Implementation of ParameterNameDiscoverer that uses the LocalVariableTable information in the method attributes to discover parameter names. Returns null if the class file was compiled without debug information.

Uses ObjectWeb's ASM library for analyzing class files. Each discoverer instance caches the ASM discovered information for each introspected Class, in a thread-safe manner. It is recommended to reuse ParameterNameDiscoverer instances as far as possible.

Author
Adrian Colyer

Author
Costin Leau

Author
Juergen Hoeller

Author
Chris Beams

Since
2.0

Constructors

<init>

LocalVariableTableParameterNameDiscoverer()

Implementation of ParameterNameDiscoverer that uses the LocalVariableTable information in the method attributes to discover parameter names. Returns null if the class file was compiled without debug information.

Uses ObjectWeb's ASM library for analyzing class files. Each discoverer instance caches the ASM discovered information for each introspected Class, in a thread-safe manner. It is recommended to reuse ParameterNameDiscoverer instances as far as possible.

Functions

getParameterNames

open fun getParameterNames(method: Method): Array<String>
open fun getParameterNames(ctor: Constructor<*>): Array<String>