reflection - how to get name of a variable in groovy -



reflection - how to get name of a variable in groovy -

i have groovy script has function 2 arguments, 1 of hashmap. want check name of hashmap variable contains substring or not, within function. how do it?

def myfunc(string var, hashmap var2) { // need routine retrive name of variable var2 }

it's explained here : getting name of method parameter

to access groovy script's method follow syntax :

metaclass.methods

reflection groovy

Comments