Java: Is there a shortcut for doing this (simple accessors/getters stuff)
<p>Suppose I have a class called Person:</p>

<pre><code>public class Person 
{
    private String name, ID, location;
}
</code></pre>

<p>Instead of writing individual accessors for name, ID, and location, is there anyway to do something like this:</p>

<pre><code>public String get%s 
{
    return this.%s
}
</code></pre>

<p>Where "%s" stands as a sort of place holder for the name of the String which I want to "get". This way, for the sake of convenience and efficiency, I will be able to write one method to access all three Strings. Thanks.</p>
