Answering a question I had above, it seems the compiler is smart enough to detect this at compile time. So, I don't really think it's worth worrying about. If you aren't using string interpolation, it will produce just a String
anyway, and if you are ... well, presumably you did it for a reason.
def s1 = 'test'
def s2 = "test"
def s3 = "${s1}"
[s1, s2, s3].each {
log.trace getObjectClassName(it)
}