title: What is the difference between a Groovy object and a Java object with regards to functionality in Groovy code?
body: <p>First of all, excuse me if I say something obvious because I did not research the answer to this question, it's just something that came to mind and couldn't find an answer to with a quick google search (I also don't know Groovy well).</p>
  
  <p>I'm reading Groovy in action (1st ed) and in section 7.6 it states that "If you want a usual Java class to be recognized as a Groovy class, you only have to implement the GroovyObject interface. For convenience, you can also subclass the abstract class GroovyObjectSupport, which provides default implementations."</p>
  
  <p>So I'm trying out some Java/Groovy (trying to find ways to make coding in Java faster/easier), and I'm instantiating this object Person, which is a Java object and the Person class does not have anything to do with Groovy (i.e. doesn't implement GroovyObject or anything). Person has a protected field, name, with getters/setters. I am able to access this like so in a groovy test case (extends GroovyTestCase), which btw is in a different package and should not be accessible like this:</p>
  
  <pre><code>Person person = new Person('joe')
  println "Name: ${person.name}"
  </code></pre>
  
  <p>Isn't that using the meta info which a Groovy object would have i.e. Groovy would intercept, get the "name" part of "person.name" and call the getName() method or something like that? But person is a Java object... i.e. it shouldn't have that logic available.</p>
  
  <p>I have not implemented GroovyObject or extended GroovyObjectSupport, yet it seems like this Java object has Groovy features I can use.</p>
  
  <p>My question is, what can I assume from Java objects used in Groovy? There is obviously something being done behind the scenes to augment Java defined classes with some Groovy features... but, which features?</p>
  
  <p>So, I guess my question boils down to: "What is done to Java classes when used within a Groovy context?"</p>
  
  <p>Any info regarding the subject would be appreciated, thanks :)</p>