I am using groovy to talk to a Java library. I am trying to get the value of a class field, and I am having trouble because of groovy’s implicit call to getters. I’m doing something like this:
and groovy is calling the
The problem I have is that the Java class has a
public field named
schemaComponent, and a getter method for that field (
getSchemaComponent). Now, in the Java library, they have deprecated the getter method in favor of the public field, and the getter method always returns
Is there a way to somehow force groovy to get the value from the public field and not the getter method?
println [email protected]
That said, any library that leaves an API call in place while trashing its semantics is one I would run away from fast.